By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,908 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,908 IT Pros & Developers. It's quick & easy.

command history behavior in windows and linux

P: n/a
Does someone know if there is a setting in the python Unix world to
make the command history behave as it does in the Windows intepreter?
Specifically, I like the fact that the command history remembers which
of a sequence of commands is the one that I last issued. For example,
suppose that I typed the following lines into the interpreter:

import foo
for e in foo.container:
print e

In Unix, I would have to tap up arrow 3 times for each line:

up up up gives me "import foo". I press enter.
up up up gives me "for...". I press enter.
up up up gives me " print...". I press enter.

In Windows, I get this behavior I like better:

up up up gives me "import foo". I press enter.
down gives me "for...". I press enter.
down gives me " print...". I press enter.

How do I get the second behavior to take place in all the platforms I
use? Also, the windows version remembers my commands across sections.
How do I enable that in the python version?

I tried editing the inputrc file that controls the readline library by
adding the following lines:

$if python
set history-preserve-point on

but this did not seem to work.


Aug 29 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.