Given an sqlite3 connection object, how can retrieve the file path to the sqlite3 file?
Referencing Martijn Pieters, except hardcoding is a must, you should do this:
path = os.path.dirname(os.path.abspath(__file__)) db = os.path.join(path, 'file.db') conn = sqlite3.connect(db)