4

In python, tab auto-completion can be enabled for raw_input with readline module:

readline.parse_and_bind("tab: complete")

However, how can I revert the effect of the line above?

I have a program that needs tab to switch between auto-completion and \t for raw_input.

Michael Kim
  • 689
  • 5
  • 20

1 Answers1

0

I came up with a workaround:

readline.set_completer(lambda text, state: text + "\t" if state == 0 else None)

But still it would be better if tab: complete can be reverted

Michael Kim
  • 689
  • 5
  • 20