Closed vendethiel closed 8 years ago
$ ./pyth.py -r --debug
Welcome to the Pyth REPL.
Each input line will be compiled and executed, and the results of
each one will be passed into the next one's input stream.
>>> 1
imp_print(1)
==================================================
1
>>> 6
imp_print(6)
==================================================
6
>>> y
assign('Q',eval_input())
imp_print(subsets(Q))
==================================================
12
>>> U
assign('Q',eval_input())
imp_print(urange(Q))
==================================================
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
Fixes #203.
I'm not "happy" with the flag parsing duplication, but the rest of the code uses
sys.argv[1:-1]
to remove the file (last arg), so we can't use that here... But that means./pyth.py -rd
won't work >.>