Files
voctrain/init_db.py
T
2022-11-23 21:35:43 +01:00

18 lines
400 B
Python
Executable File

#!/usr/bin/env python3
import sqlite3
connection = sqlite3.connect('vokabeln.db')
with open('schema.sql') as f:
connection.executescript(f.read())
cur = connection.cursor()
# cur.execute("INSERT INTO eintraege ( gaszaehler, stromzaehler, wasserzaehler, wetterinfo) VALUES ( ?, ?, ?, ?)",
# ('', '', '127', 'kalt aber oho')
# )
connection.commit()
connection.close()