Blame view

MODFIRE-Prototype/res/initialize_areas.py 379 Bytes
a4f37eed   Eduardo Eloy   initizalyzers for...
1
2
3
4
import csv, re, sqlite3

con = sqlite3.connect("database_modfire.db")
cur = con.cursor()
2cd288b3   Eduardo Eloy   project can now i...
5
f2 = open("area_init.txt", "w+")
a4f37eed   Eduardo Eloy   initizalyzers for...
6
7
8
9
10
11
12
13
14
15
16
17


toWrite = ''


for i in range(0, 1406):
	cur.execute("SELECT area FROM area_internal where ug like "+str(i)) 
	result = cur.fetchall()
	toWrite = str(result[0]).replace(')','').replace('(','')
	toWrite = toWrite[:-1]+"\n"
	f2.write(toWrite)
	toWrite = ''