From 06252d761d12912c47967b7f77ad56e792a47327 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Thu, 30 Apr 2015 19:38:18 +0300 Subject: [PATCH] Revert "Change the way we detect pyfa path" This reverts commit bb8d5d0d6585ed8058b214003b87743ae992c98d. Reverting all wx3 commits in master --- config.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/config.py b/config.py index 5e9ab637e..ca6cadff1 100644 --- a/config.py +++ b/config.py @@ -29,13 +29,6 @@ staticPath = None saveDB = None gameDB = None - -def get_main_dir(): - if hasattr(sys, "frozen"): - # print 'Running from path', os.path.dirname(sys.executable) - return unicode(os.path.dirname(os.path.realpath(os.path.abspath(sys.executable))), sys.getfilesystemencoding()) - return unicode(os.path.dirname(os.path.realpath(os.path.abspath(sys.modules['__main__'].__file__))), sys.getfilesystemencoding()) - def defPaths(): global pyfaPath global savePath @@ -47,7 +40,8 @@ def defPaths(): # Python 2.X uses ANSI by default, so we need to convert the character encoding pyfaPath = getattr(configforced, "pyfaPath", pyfaPath) if pyfaPath is None: - pyfaPath = get_main_dir() + pyfaPath = unicode(os.path.dirname(os.path.realpath(os.path.abspath( + sys.modules['__main__'].__file__))), sys.getfilesystemencoding()) # Where we store the saved fits etc, default is the current users home directory if saveInRoot is True: