Last active
November 18, 2020 18:56
-
-
Save tashrifbillah/1d01e38ac3dafef7ac916bb30849fc16 to your computer and use it in GitHub Desktop.
db file browser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sqlite3 | |
from os.path import abspath | |
import sys | |
conn= sqlite3.connect(abspath(sys.argv[1])) | |
cur = conn.cursor() | |
cur.execute("SELECT * FROM tasks") | |
rows= cur.fetchall() | |
for row in rows: | |
print(row) | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference: https://www.sqlitetutorial.net/sqlite-python/sqlite-python-select/