Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > command history behavior in windows and linux

Reply
Thread Tools

command history behavior in windows and linux

 
 
Leo
Guest
Posts: n/a
 
      08-29-2005
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
$endif

but this did not seem to work.

TIA,
Leo.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
linux console command line history kaklis@gmail.com Python 4 07-21-2010 08:03 AM
Values entered in the Form disappears when using the history.go(-1) or history.back() sujith.bolar@gmail.com Javascript 2 10-17-2006 08:12 PM
Recover Firefox web search history with history set to 0 days Sudip Chakraborty Firefox 2 11-21-2005 06:47 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM
history.dat, formhistory.dat - deleting deletes history? S.Rodgers Firefox 4 05-05-2005 01:03 AM



Advertisments