I would use the user's home folder and use the os.path module. Let's say you have a program named myapp and a database called db.sqlite.
import os.path
path = os.path.expanduser('~/.myapp/db.sqlite')
path would then be expanded to /home/user/.myapp/db.sqlite on a UNIX-based system (and similar for Mac) and C:\Users\user\Application Data\Roaming.myapp\db.sqlite (or something similar, not on a windows machine) on a Windows machine.