[pypy-svn] r15477 - pypy/dist/pypy/translator/goal
hpk at codespeak.net
hpk at codespeak.net
Sun Jul 31 17:11:00 CEST 2005
Author: hpk
Date: Sun Jul 31 17:10:59 2005
New Revision: 15477
Modified:
pypy/dist/pypy/translator/goal/targetpypymain.py
Log:
allow the entrypoint really accept a string (if it's
empty call import code ; code.interact() basically)
Modified: pypy/dist/pypy/translator/goal/targetpypymain.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetpypymain.py (original)
+++ pypy/dist/pypy/translator/goal/targetpypymain.py Sun Jul 31 17:10:59 2005
@@ -25,7 +25,10 @@
def entry_point(argvstring):
debug("entry point starting")
debug(argvstring)
- argv = argvstring.split('\x00')
+ if argvstring:
+ argv = [argvstring]
+ else:
+ argv = []
for arg in argv:
debug(" argv -> " + arg)
try:
@@ -76,6 +79,5 @@
# _____ Run translated _____
def run(c_entry_point):
- argv = [os.path.join(this_dir, 'app_example.py')]
- exitcode = c_entry_point('\x00'.join(argv))
+ exitcode = c_entry_point(os.path.join(this_dir, 'app_example.py'))
assert exitcode == 0
More information about the Pypy-commit
mailing list