Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'responding': 0.04; 'distinct': 0.05; 'interpreter': 0.05; 'retained': 0.07; 'python': 0.08; 'assumed': 0.09; 'context.': 0.09; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'underlying': 0.09; 'subject:python': 0.10; 'confused,': 0.16; 'linux).': 0.16; 'op.': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject: \n ': 0.16; 'subject:between': 0.16; 'linux': 0.17; 'wrote:': 0.18; 'mechanism': 0.21; "doesn't": 0.22; 'header :In-Reply-To:1': 0.22; 'retaining': 0.23; 'stops': 0.23; 'command': 0.24; 'shell': 0.24; 'windows': 0.26; '"the': 0.26; "i'm": 0.26; 'fact': 0.27; 'asking': 0.28; 'process,': 0.28; '24,': 0.29; 'exit': 0.29; 'nov': 0.29; 'pm,': 0.29; 'cmd': 0.30; 'confusion': 0.30; 'tjg': 0.30; 'chris': 0.30; 'does': 0.32; 'thu,': 0.32; 'comment': 0.32; 'pretty': 0.32; 'header:User- Agent:1': 0.33; 'to:addr:python-list': 0.34; 'it.': 0.34; 'too': 0.34; 'things': 0.34; 'but': 0.37; 'received:192': 0.37; 'open': 0.38; 'using': 0.38; 'steven': 0.38; 'went': 0.38; 'goes': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'received:192.168': 0.40; 'happens': 0.40; 'within': 0.60; 'type': 0.61; '2011': 0.61; 'your': 0.61; 'from:addr:mail': 0.64; 'subject:will': 0.64; 'show': 0.67; 'kept': 0.68; 'subject:commands': 0.84; 'subject:history': 0.84; 'history,': 0.91; 'lost,': 0.91 Date: Thu, 24 Nov 2011 08:51:35 +0000 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: python shell that saves history of typed in commands that will persist between reboots References: <4737007e-029d-4ecb-9315-f3ceb4bb06ed@t16g2000vba.googlegroups.com> <4ecccb07$0$29993$c3e8da3$5496439d@news.astraweb.com> <4ecda8ea$0$30003$c3e8da3$5496439d@news.astraweb.com> <4ecde007$0$30003$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1322124705 news.xs4all.nl 6960 [2001:888:2000:d::a6]:49710 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:16156 On 24/11/2011 06:22, Chris Angelico wrote: > On Thu, Nov 24, 2011 at 5:11 PM, Steven D'Aprano > wrote: >> One of us is confused, and I'm pretty sure it's you :) >> >> Tim went on to say "Obviously this only applies when an underlying cmd >> session persists", which I understood as implying that he too is using >> Linux where Ctrl-Z stops the process, but does not exit it. > > Entirely possible :) I blithely assumed from the fact that he said > "dir" that it was Windows, but it goes to show what happens when you > assume. Ahem. Sorry for any confusion caused. The OP was asking about the situation on Windows, and I was responding in that context. The Ctrl-Z thing is what *exits* the interpreter on Windows (a la Ctrl-D on Linux). 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. If you exit the cmd shell then that history is lost, and I'm not aware of any mechanism for retaining it. All this may or may not be of any use to the OP. I was responding to this comment by Steven: "The default interactive interpreter for Python doesn't have persistent history, so if you exit the interpreter and restart it, your commands are gone." TJG