initialize_external.py
381 Bytes
import csv, re, sqlite3
con = sqlite3.connect("database2.db")
cur = con.cursor()
f = open("external_init", "w+")
f2 = open("internal_init", "w+")
toWrite = ''
for i in range(0, 1373):
cur.execute("SELECT external FROM ug_ids where internal like "+str(i)+ " order by internal")
results = cur.fetchall()
toWrite = results[0]
f.write(toWrite[-1]+"\n")
f2.write(str(i)+"\n")