projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb6fe1f
)
Allow commandline to load without readline for non-Unix systems
author
W. Trevor King
<wking@drexel.edu>
Tue, 10 Aug 2010 10:44:50 +0000
(06:44 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 10 Aug 2010 10:44:50 +0000
(06:44 -0400)
hooke/ui/commandline.py
patch
|
blob
|
history
diff --git
a/hooke/ui/commandline.py
b/hooke/ui/commandline.py
index 02aa9acccc5b85dba2b4ecf432bb23e5db1e0364..4533217222eb467bab441d29e1f62f6ff210f121 100644
(file)
--- a/
hooke/ui/commandline.py
+++ b/
hooke/ui/commandline.py
@@
-23,7
+23,11
@@
line.
import codecs
import cmd
import optparse
-import readline # including readline makes cmd.Cmd.cmdloop() smarter
+try:
+ import readline # including readline makes cmd.Cmd.cmdloop() smarter
+except ImportError, e:
+ import logging
+ logging.warn('Could not import readline, bash-like line editing disabled.')
import shlex
from ..command import CommandExit, Exit, Command, Argument, StoreValue