Files
pyfa/config.py
cncfanatics b19798021d CHange stuff around to be a bit more resilient against errors, create
non-existent folders, add a staticPath config var
2010-09-28 22:07:33 +02:00

20 lines
569 B
Python

import os.path
import sys
debug = False
#Path autodetection, only change if it doesn't work
if hasattr(sys, "frozen"):
path = os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( )))
else:
path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
homePath = os.path.expanduser(os.path.join("~", ".pyfa"))
staticPath = homePath
saveddata = os.path.join(homePath, "saveddata.db")
# saveddata db location modifier, shouldn't ever need to touch this
import eos.config
eos.config.saveddata_connectionstring = "sqlite:///" + saveddata