[pypy-svn] r66659 - pypy/branch/io-lang/pypy/lang/io
david at codespeak.net
david at codespeak.net
Wed Jul 29 10:00:24 CEST 2009
Author: david
Date: Wed Jul 29 10:00:22 2009
New Revision: 66659
Added:
pypy/branch/io-lang/pypy/lang/io/autopath.py
- copied unchanged from r66655, pypy/branch/io-lang/pypy/bin/autopath.py
Modified:
pypy/branch/io-lang/pypy/lang/io/parserhack.py
Log:
make it possible to use parserhack from the commandline
Modified: pypy/branch/io-lang/pypy/lang/io/parserhack.py
==============================================================================
--- pypy/branch/io-lang/pypy/lang/io/parserhack.py (original)
+++ pypy/branch/io-lang/pypy/lang/io/parserhack.py Wed Jul 29 10:00:22 2009
@@ -1,3 +1,4 @@
+import autopath
import py
import os
import glob
@@ -12,7 +13,7 @@
child_in.write(input)
child_in.close()
s = child_out_err.read().strip()
- # print s
+ print s
return eval(s)
def interpret(code):
@@ -30,4 +31,10 @@
def load_io_files(space):
files = glob.glob('io/*.io')
for f in files:
- parse_file(f, space).eval(space, space.w_lobby, space.w_lobby)
\ No newline at end of file
+ parse_file(f, space).eval(space, space.w_lobby, space.w_lobby)
+
+
+if __name__ == '__main__':
+ import sys
+ space = ObjSpace()
+ parse(py.path.local(sys.argv[1]).read(), space)
\ No newline at end of file
More information about the Pypy-commit
mailing list