projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f531891
)
Polyglotize.
author
Eric S. Raymond
<esr@thyrsus.com>
Sat, 25 Feb 2017 10:33:55 +0000
(
05:33
-0500)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sat, 25 Feb 2017 10:33:55 +0000
(
05:33
-0500)
sst.py
patch
|
blob
|
history
diff --git
a/sst.py
b/sst.py
index 58857746e4b63c47474ffea7e956da28c6ba246c..2cc711bff8a37f570eec3fcefec01e5605ff8a2e 100755
(executable)
--- a/
sst.py
+++ b/
sst.py
@@
-21,6
+21,13
@@
try:
except ImportError:
pass
except ImportError:
pass
+# Prevent lossage under Python 3
+try:
+ my_input = raw_input
+except NameError:
+ my_input = input
+
+
version = "2.1"
docpath = (".", "doc/", "/usr/share/doc/sst/")
version = "2.1"
docpath = (".", "doc/", "/usr/share/doc/sst/")
@@
-3404,7
+3411,7
@@
def pause_game():
sys.stdout.write('\n')
proutn(prompt)
if not replayfp:
sys.stdout.write('\n')
proutn(prompt)
if not replayfp:
- input()
+
my_
input()
sys.stdout.write('\n' * rows)
linecount = 0
sys.stdout.write('\n' * rows)
linecount = 0
@@
-3476,7
+3483,7
@@
def cgetline():
elif linein[0] != "#":
break
else:
elif linein[0] != "#":
break
else:
- linein =
eval(input()
) + "\n"
+ linein =
my_input(
) + "\n"
if logfp:
logfp.write(linein)
return linein
if logfp:
logfp.write(linein)
return linein