Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8379
Modified Files:
util.py
Log Message:
added main_is_frozen workaround for Mac
Index: util.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/util.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** util.py 12 Aug 2004 19:10:04 -0000 1.27
--- util.py 20 Aug 2004 22:03:29 -0000 1.28
***************
*** 14,21 ****
# if a module is running standalone
def main_is_frozen():
! 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
--- 14,25 ----
# if a module is running standalone
def main_is_frozen():
! if sys.platform == 'darwin':
! # this is a temporary hack for bundlebuilder
! 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
|