summaryrefslogtreecommitdiff
path: root/examples/monitor.py
diff options
context:
space:
mode:
authorSteven Myint <git@stevenmyint.com>2013-10-04 10:23:57 -0700
committerSteven Myint <git@stevenmyint.com>2013-10-04 10:23:57 -0700
commit178adc68ec0e15fd05cfd2441ee925319028b50f (patch)
tree1c8a97fbde948ca9ea6cc5de90803ba6b8bb062c /examples/monitor.py
parenta12cbd428a1efa28092448962c48056f7d914e57 (diff)
downloadpexpect-178adc68ec0e15fd05cfd2441ee925319028b50f.tar.gz
Add some Python 3 support
Diffstat (limited to 'examples/monitor.py')
-rwxr-xr-xexamples/monitor.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/monitor.py b/examples/monitor.py
index a44ebfd..1504bbd 100755
--- a/examples/monitor.py
+++ b/examples/monitor.py
@@ -45,10 +45,17 @@ from __future__ import print_function
from __future__ import absolute_import
-import os, sys, time, re, getopt, getpass
+import os, sys, re, getopt, getpass
import traceback
import pexpect
+
+try:
+ raw_input
+except NameError:
+ raw_input = input
+
+
#
# Some constants.
#