Is there a way of using raw_input without leaving a sign in the readline history, so that it don't show when tab-completing?
+2
A:
You could make a function something like
import readline
def raw_input_no_history():
input = raw_input()
readline.remove_history_item(readline.get_current_history_length()-1)
return input
and call that function instead of raw_input. You may not need the minus 1 dependent on where you call it from.
David Raznick
2009-07-29 18:53:08
Thanks. But you forgot to return the output of raw_input ;)
lostgeek
2009-07-30 10:48:54
oops, It has been fixed.
David Raznick
2009-07-30 11:04:38