I'm trying to write a small REPL using the
Luckily, the docs mention "If completekey is not None and readline is available, command completion is done automatically." So I set
readline module is only imported if
completekey has a non-None value. It looks like the only way to use
readline and disable completion is to specify a do-nothing completer.
class CmdSubclass(Cmd): # Other configuration # ... def complete(self, *args): pass