import sqlite3
basedir='''C:\WorkSpace\PythonProgram\SSOETLMonitor'''
dbfile='''ssoetlmonitor.db'''
conn=sqlite3.connect(basedir+'\\'+dbfile)
md={}
tabs=conn.execute('''select name from sqlite_master where type='table' ''')
def Generate_Row(table_name):
row={}
cols=conn.execute(f"PRAGMA table_info({tab_name})")
for col in cols:
col_name=col[1]
row[col_name]=f"{tab_name}:{col_name}"
return row
for tab in tabs:
tab_name=tab[0]
md[tab_name]={}
cols=conn.execute(f"PRAGMA table_info({tab_name})")
for col in cols:
col_name=col[1]
md[tab_name][col_name]=f"{tab_name}:{col_name}"