better check for frozen, thanks Niphlod

This commit is contained in:
mdipierro
2012-08-20 10:57:11 -05:00
parent 8846dbf6a1
commit 3ca4e928da
2 changed files with 4 additions and 4 deletions

View File

@@ -1 +1 @@
Version 2.00.0 (2012-08-20 10:54:56) dev
Version 2.00.0 (2012-08-20 10:57:08) dev

View File

@@ -4,11 +4,11 @@
import os
import sys
if '__file__' in globals():
if getattr(sys, 'frozen', None):
path = os.getcwd() # Seems necessary for py2exe
else:
path = os.path.dirname(os.path.abspath(__file__))
os.chdir(path)
else:
path = os.getcwd() # Seems necessary for py2exe
sys.path = [path]+[p for p in sys.path if not p==path]