[pypy-svn] r35229 - pypy/dist/pypy/translator/goal
arigo at codespeak.net
arigo at codespeak.net
Sun Dec 3 22:48:12 CET 2006
Author: arigo
Date: Sun Dec 3 22:48:10 2006
New Revision: 35229
Modified:
pypy/dist/pypy/translator/goal/app_main.py
Log:
Fix app_main more, for the case "python -- -c".
Modified: pypy/dist/pypy/translator/goal/app_main.py
==============================================================================
--- pypy/dist/pypy/translator/goal/app_main.py (original)
+++ pypy/dist/pypy/translator/goal/app_main.py Sun Dec 3 22:48:10 2006
@@ -171,6 +171,7 @@
break
go_interactive = False
+ run_command = False
i = 0
while i < len(argv):
arg = argv[i]
@@ -182,6 +183,7 @@
if i >= len(argv):
print_error('Argument expected for the -c option')
return 2
+ run_command = True
break
elif arg == '-u':
set_unbuffered_io()
@@ -226,7 +228,7 @@
try:
if sys.argv:
- if sys.argv[0] == '-c':
+ if run_command:
cmd = sys.argv.pop(1)
def run_it():
exec cmd in mainmodule.__dict__
More information about the Pypy-commit
mailing list