From 53ea9a32b6c7c1588bfff6c365dc4f3b50c88fc1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 10 Aug 2010 06:44:50 -0400 Subject: [PATCH] Allow commandline to load without readline for non-Unix systems --- hooke/ui/commandline.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hooke/ui/commandline.py b/hooke/ui/commandline.py index 02aa9ac..4533217 100644 --- 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 -- 2.26.2