Blame view

Database-Modfire/convert_u.py 295 Bytes
8bb30baa   Eduardo Eloy   inital database c...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import csv, sqlite3

con = sqlite3.connect("database_modfire.db")
cur = con.cursor()

	
fin = open("i.csv", "rt")
for line in fin:
	cur.execute("SELECT internal FROM ug_ids WHERE external = "+line+";")
	ugid = cur.fetchall()
	print("% s" % ugid[0] + ",")



con.commit()
con.close()
fin.close()