Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15757 > unrolled thread

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

Started bygoldtech <goldtech@worldpost.com>
First post2011-11-15 19:38 -0800
Last post2011-11-27 17:20 -0800
Articles 7 on this page of 27 — 13 participants

Back to article view | Back to comp.lang.python


Contents

  python shell that saves history of typed in commands that will persist between reboots goldtech <goldtech@worldpost.com> - 2011-11-15 19:38 -0800
    Re: python shell that saves history of typed in commands that will persist between reboots sword <john.37@gmail.com> - 2011-11-15 19:45 -0800
    Re: python shell that saves history of typed in commands that will persist between reboots Tim Golden <mail@timgolden.me.uk> - 2011-11-16 08:37 +0000
    Re: python shell that saves history of typed in commands that will persist between reboots Ben Finney <ben+python@benfinney.id.au> - 2011-11-17 08:09 +1100
      Re: python shell that saves history of typed in commands that will persist between reboots David Robinow <drobinow@gmail.com> - 2011-11-16 18:46 -0500
        Re: python shell that saves history of typed in commands that will persist between reboots Ben Finney <ben+python@benfinney.id.au> - 2011-11-17 10:59 +1100
          Re: python shell that saves history of typed in commands that will persist between reboots David Robinow <drobinow@gmail.com> - 2011-11-16 19:49 -0500
          Re: python shell that saves history of typed in commands that will persist between reboots Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-11-24 15:05 +0100
      Re: python shell that saves history of typed in commands that will persist between reboots alex23 <wuwei23@gmail.com> - 2011-11-16 19:04 -0800
    Re: python shell that saves history of typed in commands that will persist between reboots Anssi Saari <as@sci.fi> - 2011-11-23 11:23 +0200
      Re: python shell that saves history of typed in commands that will persist between reboots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-23 10:29 +0000
        Re: python shell that saves history of typed in commands that will persist between reboots Tim Golden <mail@timgolden.me.uk> - 2011-11-23 10:37 +0000
          Re: python shell that saves history of typed in commands that will persist between reboots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-24 02:16 +0000
            Re: python shell that saves history of typed in commands that will persist between reboots Chris Angelico <rosuav@gmail.com> - 2011-11-24 15:30 +1100
              Re: python shell that saves history of typed in commands that will persist between reboots Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-11-24 06:11 +0000
                Re: python shell that saves history of typed in commands that will persist between reboots Chris Angelico <rosuav@gmail.com> - 2011-11-24 17:22 +1100
                Re: python shell that saves history of typed in commands that will persist between reboots Tim Golden <mail@timgolden.me.uk> - 2011-11-24 08:51 +0000
                  Re: python shell that saves history of typed in commands that will persist between reboots alex23 <wuwei23@gmail.com> - 2011-11-24 19:49 -0800
                    Re: python shell that saves history of typed in commands that will persist between reboots Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-11-25 11:37 +0100
                      Re: python shell that saves history of typed in commands that will persist between reboots Tim Golden <mail@timgolden.me.uk> - 2011-11-25 11:29 +0000
                        Re: python shell that saves history of typed in commands that will persist between reboots 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-25 15:19 -0800
                        Re: python shell that saves history of typed in commands that will persist between reboots 88888 Dihedral <dihedral88888@googlemail.com> - 2011-11-25 15:19 -0800
                Re: python shell that saves history of typed in commands that will persist between reboots Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-11-24 10:11 -0800
          Re: python shell that saves history of typed in commands that will persist between reboots alex23 <wuwei23@gmail.com> - 2011-11-24 19:47 -0800
            Re: python shell that saves history of typed in commands that will persist between reboots Tim Golden <mail@timgolden.me.uk> - 2011-11-25 08:58 +0000
              Re: python shell that saves history of typed in commands that will persist between reboots alex23 <wuwei23@gmail.com> - 2011-11-25 19:42 -0800
    Re: python shell that saves history of typed in commands that will persist between reboots DevPlayer <devplayer@gmail.com> - 2011-11-27 17:20 -0800

Page 2 of 2 — ← Prev page 1 [2]


#16239

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-11-25 15:19 -0800
Message-ID<mailman.3050.1322263169.27778.python-list@python.org>
In reply to#16218
> Except that, intriguingly, I'm also using an ActiveState distro
> and it neither adds Ctrl-D nor prevents history. But I'm
> fairly sure that pyreadline does both of those things.
> 
> TJG

In python I can spawn a process to run python byte code that will produce a file with results. Easy to avoid a lot import A,B,C,D...... on the top level.

[toc] | [prev] | [next] | [standalone]


#16240

From88888 Dihedral <dihedral88888@googlemail.com>
Date2011-11-25 15:19 -0800
Message-ID<26406614.367.1322263165339.JavaMail.geo-discussion-forums@prnu18>
In reply to#16218
> Except that, intriguingly, I'm also using an ActiveState distro
> and it neither adds Ctrl-D nor prevents history. But I'm
> fairly sure that pyreadline does both of those things.
> 
> TJG

In python I can spawn a process to run python byte code that will produce a file with results. Easy to avoid a lot import A,B,C,D...... on the top level.

[toc] | [prev] | [next] | [standalone]


#16171

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2011-11-24 10:11 -0800
Message-ID<mailman.3009.1322158303.27778.python-list@python.org>
In reply to#16147
On Thu, 24 Nov 2011 08:51:35 +0000, Tim Golden <mail@timgolden.me.uk>
declaimed the following in gmane.comp.python.general:


> In short - on Windows, within one cmd shell you can open and exit
> the interpreter as many times as you like and the Python command
> history will be retained via the cmd shell's history mechanism,
> and kept distinct from the history of other things you may type
> into the cmd shell.
>
	Ah, so THAT is what the "number of buffers" control in "Command
Prompt Properties/Options" is meant for...
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#16193

Fromalex23 <wuwei23@gmail.com>
Date2011-11-24 19:47 -0800
Message-ID<944e0207-7083-4ae8-a59e-3e05b595708e@d37g2000prg.googlegroups.com>
In reply to#16102
Tim Golden <m...@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.

[toc] | [prev] | [next] | [standalone]


#16206

FromTim Golden <mail@timgolden.me.uk>
Date2011-11-25 08:58 +0000
Message-ID<mailman.3030.1322211521.27778.python-list@python.org>
In reply to#16193
On 25/11/2011 03:47, alex23 wrote:
> Tim Golden<m...@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

[toc] | [prev] | [next] | [standalone]


#16242

Fromalex23 <wuwei23@gmail.com>
Date2011-11-25 19:42 -0800
Message-ID<e787409a-c205-464c-a2ba-9735bbf35b58@f3g2000pri.googlegroups.com>
In reply to#16206
On Nov 25, 6:58 pm, Tim Golden <m...@timgolden.me.uk> wrote:
> Do you have the pyreadline module installed? ISTR that that takes
> over from the standard cmd processing...

I'm pretty sure I do.

It's really not an issue, though, as I tend to stick to linux &
iPython where possible :)

[toc] | [prev] | [next] | [standalone]


#16304

FromDevPlayer <devplayer@gmail.com>
Date2011-11-27 17:20 -0800
Message-ID<f240c085-d51f-4b72-8ee2-fed8df00a8fd@o1g2000vbe.googlegroups.com>
In reply to#15757
On Nov 15, 10:38 pm, goldtech <goldt...@worldpost.com> wrote:
> Hi,
>
> Using Windows. Is there a python shell that has a history of typed in
> commands?
>
> I don't need output of commands just what I typed it. I need it to
> save between sessions - something that no shell seems to do. If I
> reboot there will still be a command history somewhere.
>
> Like bash history in Linux.
>
> Thanks

Something that might be of interest is wxPython's pyslicesshell.py
it's not commandline in console window but the interpreter in a
window. And you can save it.

I haven't used it lately by there's also PythonWin
http://python.net/crew/skippy/win32/PythonwinPreview.html

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.python


csiph-web