python shell that saves history of typed in commands that will persist between reboots

Tim Golden mail at timgolden.me.uk
Fri Nov 25 03:58:30 EST 2011


On 25/11/2011 03:47, alex23 wrote:
> Tim Golden<m... at timgolden.me.uk>  wrote:
>> The interpreter inherits the command shell's history function:
>> Open a cmd window and then a Python session. Do some stuff.
>>
>> Ctrl-Z to exit to the surrounding cmd window.
>> Do some random cmd stuff: dir, cd, etc.
>>
>> Start a second Python session. up-arrow etc. will bring back
>> the previous Python session's commands (and not the ones you
>> entered in the surrounding shell)
>
> This isn't true, at least not for ActivePython 2.7.2.5 under Windows
> 7-64. The second session has no history whatsoever.

Well I don't know what to say. It works for me with an almost
identical setup. (ActivePython 2.7.1.4 Win7 x64). And has worked
for me over countless setups on different machines / versions of
Windows / versions of Python etc.

Do you have the pyreadline module installed? ISTR that that takes
over from the standard cmd processing...

TJG



More information about the Python-list mailing list