Page MenuHomeMiraheze
Paste P383

read_db.py
ActivePublic

Authored by Paladox on Feb 9 2021, 23:16.
Tags
None
Referenced Files
F1391152: read_db.py
Feb 9 2021, 23:16
Subscribers
None
#! /usr/bin/python3
import sqlite3, csv
conn = sqlite3.connect('/home/southparkfan/resp_time.db')
cur = conn.cursor()
cur.execute("SELECT * FROM 'resp_time';")
rows = cur.fetchall()
with open("resp_time.csv", "wb") as write_file:
for row in rows:
writeRow = ",".join([str(i) for i in row])
write_file.write(writeRow.encode() + "\n".encode())

Event Timeline