Included correct path detection when pyfa is ran from a distribution pack (frozen state)

This commit is contained in:
HomeWorld
2010-09-22 23:44:39 +03:00
parent c079759426
commit 7be8b57a7c

View File

@@ -4,6 +4,11 @@ import sys
debug = False
#Path autodetection, only change if it doesn't work
path = os.path.dirname(unicode(__file__, sys.getfilesystemencoding()))
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"))