Re: installing PythonCard on Mac OS X Leopard, Snow Leopard, Lion, etc.
Kevin Altis <[email protected]> Mon, 4 Jun 2012 07:24:00 -0700
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
Yes, the main_is_frozen method is the only thing that gets changed. ka On Jun 3, 2012, at 11:05 PM, [email protected] wrote: > > After you have PythonCard installed, it will be necessary to make a > modification to the file util.py located at > /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PythonCard/util.py > I opened this file in BBEdit and it has 420 lines of code. > In util.py, change the following method to simplify the bundlebuilder > check rather than having it checking for specific versions of MacPython... > > def main_is_frozen(): > if sys.platform == 'darwin': > # this is a temporary hack for bundlebuilder > return not (sys.executable.endswith('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 > Does this code replace the block of lines 14 through 23? ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/