Skip to content Skip to sidebar Skip to footer

Python Cmd Tab Completion Problems

I've got an application I'm currently working on for our company. Its currently built around Python's Cmd module, and features tab-completion for a number of tasks. For some reaso

Solution 1:

Check if the environment variable PYTHONSTARTUP is set properly. It should point to a script which in turn needs to do sth like this:

try:
    import readline
except ImportError:
    sys.stdout.write("No readline module found, no tab completion available.\n")
else:
    import rlcompleter
    readline.parse_and_bind('tab: complete')

Maybe (some part of) this is only done properly on the one working machine?

Maybe the readline module is available only on the one working machine?

Post a Comment for "Python Cmd Tab Completion Problems"