How do I get sqlite3 to use relative path when connecting to a db? [duplicate]

Solution
import os

path = os.path.dirname(os.path.realpath(__file__)) # directory path of the app
conn = sqlite3.connect(path+"/down.db")

# or - after @S3DEV comment
conn = sqlite3.connect(os.path.join(path, "down.db"))