mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00

Another applet mechanism has been developed for Python on Mac OS X and trying to use the -c "__import__('run').main()" trick is just not working. macosx_main.py is a new file which should be used as the startup file for Mac OS X applet bundles. This startup file understands a -p option, which when seen will start run.main(). When running as an applet, this seems like the best approach.
10 lines
247 B
Python
10 lines
247 B
Python
"boolcheck - import this module to ensure True, False, bool() builtins exist."
|
|
try:
|
|
True
|
|
except NameError:
|
|
import __builtin__
|
|
__builtin__.True = 1
|
|
__builtin__.False = 0
|
|
from operator import truth
|
|
__builtin__.bool = truth
|
|
|