summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmd2.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index bd48c404..3504d7d4 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -34,7 +34,6 @@ import optparse
import os
import platform
import re
-import readline
import shlex
import six
import subprocess
@@ -80,6 +79,13 @@ try:
except ImportError:
ipython_available = False
+# Try to import readline, but allow failure for convenience in Windows unit testing
+# Note: If this actually fails, you should install readline on Linux or Mac or pyreadline on Windows
+try:
+ import readline
+except ImportError:
+ pass
+
__version__ = '0.7.1a'
# Pyparsing enablePackrat() can greatly speed up parsing, but problems have been seen in Python 3 in the past