Possible duplicate:
raw_input without leaving the story in readline
I am working on a simple interactive application that relies on iPython. I encounter a problem when a user request for input (e.g. using raw_input ()) adds an element to iPython history, and I would prefer it not to be.
A session might look like this:
In [1]: foo = MyClass() In [2]: foo.do_something() >>> Enter something: bar Out [2]: results of foo.do_something()
At this moment, the last element in the history of the shell is "bar", which is not particularly useful. Is there an easy way to prevent a user from entering raw_input () in history?
Edit: bad, this is a problem with readline, not iPython, and there is a more direct question (with answer): raw_input, without leaving the history in readline
Gdorn source share