Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29872
Modified Files:
util.py
Log Message:
updated for new py2exe
Index: util.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/util.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** util.py 20 Aug 2004 22:03:29 -0000 1.28
--- util.py 22 Aug 2004 17:25:58 -0000 1.29
***************
*** 18,25 ****
return not sys.executable == '/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/Contents/MacOS/Python'
else:
! return (hasattr(sys, "importers") # py2exe
! or imp.is_frozen("__main__") # cx_freeze or tools/freeze
! or hasattr(sys, "frozen") # McMillan installer
! )
# this is how I expected os.path.dirname to work
--- 18,29 ----
return not sys.executable == '/System/Library/Frameworks/Python.framework/Versions/2.3/Resources/Python.app/Contents/MacOS/Python'
else:
! return (hasattr(sys, "frozen") or # new py2exe, McMillan
! hasattr(sys, "importers") # old py2exe
! or imp.is_frozen("__main__")) # tools/freeze, cx_freeze
!
! def get_main_dir():
! if main_is_frozen():
! return os.path.dirname(sys.executable)
! return os.path.dirname(sys.argv[0])
# this is how I expected os.path.dirname to work
|