[pypy-svn] r14492 - pypy/dist/pypy/translator/goal
arigo at codespeak.net
arigo at codespeak.net
Mon Jul 11 13:36:38 CEST 2005
Author: arigo
Date: Mon Jul 11 13:36:37 2005
New Revision: 14492
Modified:
pypy/dist/pypy/translator/goal/translate_pypy.py
pypy/dist/pypy/translator/goal/unixcheckpoint.py
Log:
With -fork, don't wait for user input the first time, and don't show pdb
when the user enters 'quit'.
Modified: pypy/dist/pypy/translator/goal/translate_pypy.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate_pypy.py (original)
+++ pypy/dist/pypy/translator/goal/translate_pypy.py Mon Jul 11 13:36:37 2005
@@ -110,7 +110,7 @@
a.simplify()
if a and options['-fork']:
from pypy.translator.goal import unixcheckpoint
- unixcheckpoint.restartable_point()
+ unixcheckpoint.restartable_point(auto='run')
if a and not options['-no-t']:
print 'Specializing...'
t.specialize()
@@ -540,6 +540,8 @@
if not options['-o']:
print 'Running!'
targetspec_dic['run'](c_entry_point)
+ except SystemExit:
+ raise
except:
debug(True)
else:
Modified: pypy/dist/pypy/translator/goal/unixcheckpoint.py
==============================================================================
--- pypy/dist/pypy/translator/goal/unixcheckpoint.py (original)
+++ pypy/dist/pypy/translator/goal/unixcheckpoint.py Mon Jul 11 13:36:37 2005
@@ -1,14 +1,18 @@
import os
-def restartable_point():
+def restartable_point(auto=None):
while True:
while True:
print '---> Checkpoint: run / quit / pdb ?'
- try:
- line = raw_input().strip().lower()
- except (KeyboardInterrupt, EOFError), e:
- print '(%s ignored)' % e.__class__.__name__
- continue
+ if auto:
+ line = auto
+ auto = None
+ else:
+ try:
+ line = raw_input().strip().lower()
+ except (KeyboardInterrupt, EOFError), e:
+ print '(%s ignored)' % e.__class__.__name__
+ continue
if line == 'run':
break
if line == 'quit':
More information about the Pypy-commit
mailing list