Last active
December 28, 2015 12:29
-
-
Save Wilfred/7501200 to your computer and use it in GitHub Desktop.
read_input.py works fine, but read_input_rpython_import.py writes a strange traceback to the console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ PYTHONPATH=pypy python2 read_input_rpython_import.py | |
| [platform:execute] gcc -c -O3 -pthread -fomit-frame-pointer -Wall -Wno-unused /tmp/usession-release-2.2.x-41/platcheck_0.c -o /tmp/usession-release-2.2.x-41/platcheck_0.o | |
| [platform:execute] gcc /tmp/usession-release-2.2.x-41/platcheck_0.o -pthread -lintl -lrt -o /tmp/usession-release-2.2.x-41/platcheck_0 | |
| > ^C | |
| Traceback (most recent call last): | |
| caught keyboard interrupt | |
| File "/home/wilfred/projects/baobob/pypy/rpython/tool/runsubprocess.py", line 39, in <module> | |
| > operation = sys.stdin.readline() | |
| KeyboardInterrupt | |
| ^C | |
| caught keyboard interrupt | |
| > ^C | |
| caught keyboard interrupt | |
| > |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| def entry_point(argv): | |
| while True: | |
| try: | |
| user_input = raw_input('> ') | |
| print user_input | |
| except KeyboardInterrupt: | |
| print '\nkeyboard interrupt' | |
| return 0 | |
| def target(*args): | |
| return entry_point, None | |
| if __name__ == '__main__': | |
| entry_point(sys.argv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from rpython.rlib.rsre import rsre_core | |
| def entry_point(argv): | |
| while True: | |
| try: | |
| user_input = raw_input('> ') | |
| print user_input | |
| except KeyboardInterrupt: | |
| print '\ncaught keyboard interrupt' | |
| return 0 | |
| def target(*args): | |
| return entry_point, None | |
| if __name__ == '__main__': | |
| entry_point(sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment