import sqlite3 class SqliteDB: def __init__(self): self.con = sqlite3.connect('sqlite3.db') with self.con.cursor() as cur: cur.execute("CREATE TABLE current (timestamp text, source text, channel int, value real") cur.commit() def write(self, meas): with self.con.cursor() as cur: cur.execute("INSERT INTO current VALUES (")