[pypy-svn] r62606 - pypy/branch/pyjitpl5/pypy/jit/tl

fijal at codespeak.net fijal at codespeak.net
Thu Mar 5 18:55:06 CET 2009


Author: fijal
Date: Thu Mar  5 18:55:04 2009
New Revision: 62606

Modified:
   pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py
Log:
grr. Ask if actually someone meant C-c


Modified: pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py	Thu Mar  5 18:55:04 2009
@@ -46,7 +46,9 @@
 def entry_point():
     source = readfile('pypyjit_demo.py')
     ec = space.getexecutioncontext()
+    print "compiling..."
     code = ec.compiler.compile(source, '?', 'exec', 0)
+    print "compiled"
     code.exec_code(space, w_dict, w_dict)
 
 
@@ -76,7 +78,13 @@
             pass
         print '-' * 79
         print 'Child process finished, press Enter to restart...'
-        raw_input()
+        try:
+            raw_input()
+        except KeyboardInterrupt:
+            x = raw_input("are you sure? (y/n)")
+            if x == 'y':
+                raise
+            # otherwise continue
 
     from pypy.jit.tl.pypyjit_child import run_child
     run_child(globals(), locals())



More information about the Pypy-commit mailing list