diff options
Diffstat (limited to 'ext/ply/example/BASIC/basic.py')
-rw-r--r-- | ext/ply/example/BASIC/basic.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/ply/example/BASIC/basic.py b/ext/ply/example/BASIC/basic.py index 3a07acdbf..b14483d2d 100644 --- a/ext/ply/example/BASIC/basic.py +++ b/ext/ply/example/BASIC/basic.py @@ -4,6 +4,9 @@ import sys sys.path.insert(0,"../..") +if sys.version_info[0] >= 3: + raw_input = input + import basiclex import basparse import basinterp @@ -41,7 +44,7 @@ while 1: prog = basparse.parse(line) if not prog: continue - keys = prog.keys() + keys = list(prog) if keys[0] > 0: b.add_statements(prog) else: @@ -58,8 +61,8 @@ while 1: elif stat[0] == 'NEW': b.new() - - + + |