better check for frozen, thanks Niphlod
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.00.0 (2012-08-20 10:54:56) dev
|
Version 2.00.0 (2012-08-20 10:57:08) dev
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
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__))
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
else:
|
|
||||||
path = os.getcwd() # Seems necessary for py2exe
|
|
||||||
|
|
||||||
sys.path = [path]+[p for p in sys.path if not p==path]
|
sys.path = [path]+[p for p in sys.path if not p==path]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user