ae01b1d
From a758ce0876e6a0ab0dc54c91d7c286ea9a53e96a Mon Sep 17 00:00:00 2001
ae01b1d
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ae01b1d
Date: Sat, 12 Dec 2015 16:03:05 +0100
ae01b1d
Subject: [PATCH 3/5] py3: raw_input
ae01b1d
ae01b1d
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
ae01b1d
---
ae01b1d
 src/Quest.py | 14 ++++++++++----
ae01b1d
 1 file changed, 10 insertions(+), 4 deletions(-)
ae01b1d
ae01b1d
diff --git a/src/Quest.py b/src/Quest.py
ae01b1d
index 751b277..5c7500d 100644
ae01b1d
--- a/src/Quest.py
ae01b1d
+++ b/src/Quest.py
ae01b1d
@@ -425,18 +425,24 @@ def demo():
ae01b1d
     tActual = None
ae01b1d
     while tActual is None:
ae01b1d
         sys.stdout.write('Specify true threshold of simulated observer: ')
ae01b1d
-        input = raw_input()
ae01b1d
         try:
ae01b1d
-            tActual = float(input)
ae01b1d
+            inp = raw_input()
ae01b1d
+        except NameError:
ae01b1d
+            inp = input()
ae01b1d
+        try:
ae01b1d
+            tActual = float(inp)
ae01b1d
         except:
ae01b1d
             pass
ae01b1d
     
ae01b1d
     tGuess = None
ae01b1d
     while tGuess is None:
ae01b1d
         sys.stdout.write('Estimate threshold: ')
ae01b1d
-        input = raw_input()
ae01b1d
         try:
ae01b1d
-            tGuess = float(input)
ae01b1d
+            inp = raw_input()
ae01b1d
+        except NameError:
ae01b1d
+            inp = input()
ae01b1d
+        try:
ae01b1d
+            tGuess = float(inp)
ae01b1d
         except:
ae01b1d
             pass
ae01b1d
     
ae01b1d
-- 
ae01b1d
2.6.4
ae01b1d