summaryrefslogtreecommitdiffstats
path: root/Lib/plat-mac/appletrawmain.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-04-09 13:25:43 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-04-09 13:25:43 (GMT)
commit0ae3220736f9b71820b01aee1f540d0afcceb9a6 (patch)
tree6015b689b7555940e0c0822b1896fff3ee39cb23 /Lib/plat-mac/appletrawmain.py
parent058a84f36ae62dc69f4cb2a07d038e10a617fffc (diff)
downloadcpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.zip
cpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.tar.gz
cpython-0ae3220736f9b71820b01aee1f540d0afcceb9a6.tar.bz2
Detabbed.
Diffstat (limited to 'Lib/plat-mac/appletrawmain.py')
-rw-r--r--Lib/plat-mac/appletrawmain.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/Lib/plat-mac/appletrawmain.py b/Lib/plat-mac/appletrawmain.py
index 4771f3c..88259c1 100644
--- a/Lib/plat-mac/appletrawmain.py
+++ b/Lib/plat-mac/appletrawmain.py
@@ -14,13 +14,13 @@ import marshal
# directory.
#
if not sys.argv or sys.argv[0][:1] == '-':
- # Insert our (guessed) name.
- _dir = os.path.split(sys.executable)[0] # removes "python"
- _dir = os.path.split(_dir)[0] # Removes "MacOS"
- _dir = os.path.join(_dir, 'Resources')
- sys.argv.insert(0, '__rawmain__')
+ # Insert our (guessed) name.
+ _dir = os.path.split(sys.executable)[0] # removes "python"
+ _dir = os.path.split(_dir)[0] # Removes "MacOS"
+ _dir = os.path.join(_dir, 'Resources')
+ sys.argv.insert(0, '__rawmain__')
else:
- _dir = os.path.split(sys.argv[0])[0]
+ _dir = os.path.split(sys.argv[0])[0]
#
# Add the Resources directory to the path. This is where files installed
# by BuildApplet.py with the --extra option show up, and if those files are
@@ -36,28 +36,28 @@ argvemulator.ArgvCollector().mainloop()
#
__file__ = os.path.join(_dir, '__main__.py')
if os.path.exists(__file__):
- #
- # Setup something resembling a normal environment and go.
- #
- sys.argv[0] = __file__
- del argvemulator, os, sys, _dir
- execfile(__file__)
+ #
+ # Setup something resembling a normal environment and go.
+ #
+ sys.argv[0] = __file__
+ del argvemulator, os, sys, _dir
+ execfile(__file__)
else:
- __file__ = os.path.join(_dir, '__main__.pyc')
- if os.path.exists(__file__):
- #
- # If we have only a .pyc file we read the code object from that
- #
- sys.argv[0] = __file__
- _fp = open(__file__, 'rb')
- _fp.read(8)
- __code__ = marshal.load(_fp)
- #
- # Again, we create an almost-normal environment (only __code__ is
- # funny) and go.
- #
- del argvemulator, os, sys, marshal, _dir, _fp
- exec __code__
- else:
- sys.stderr.write("%s: neither __main__.py nor __main__.pyc found\n"%sys.argv[0])
- sys.exit(1)
+ __file__ = os.path.join(_dir, '__main__.pyc')
+ if os.path.exists(__file__):
+ #
+ # If we have only a .pyc file we read the code object from that
+ #
+ sys.argv[0] = __file__
+ _fp = open(__file__, 'rb')
+ _fp.read(8)
+ __code__ = marshal.load(_fp)
+ #
+ # Again, we create an almost-normal environment (only __code__ is
+ # funny) and go.
+ #
+ del argvemulator, os, sys, marshal, _dir, _fp
+ exec __code__
+ else:
+ sys.stderr.write("%s: neither __main__.py nor __main__.pyc found\n"%sys.argv[0])
+ sys.exit(1)