Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'interpreter': 0.05; 'definitions.': 0.07; "'...'": 0.09; 'executed': 0.09; 'nice!': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:command': 0.09; 'thats': 0.09; 'jan': 0.12; 'mostly': 0.14; 'appear.': 0.16; 'dialog.': 0.16; 'idle.': 0.16; 'interpreter,': 0.16; 'letting': 0.16; 'operation.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'similarly,': 0.16; 'stderr': 0.16; 'stdout': 0.16; 'subject:Classes': 0.16; 'wrote:': 0.18; 'bit': 0.19; '>>>': 0.22; 'shell': 0.22; 'header:User-Agent:1': 0.23; "aren't": 0.24; 'config': 0.24; 'convenient': 0.24; 'oriented': 0.24; 'fairly': 0.24; 'mon,': 0.24; 'order.': 0.26; 'tracker': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; '(this': 0.29; 'statement': 0.30; 'code': 0.31; 'lines': 0.31; 'multiline': 0.31; 'trivial': 0.31; 'file': 0.32; 'monday,': 0.33; 'subject:the': 0.34; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'consistent': 0.36; 'idle': 0.36; 'done': 0.36; 'changing': 0.37; 'list.': 0.37; 'todo': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'even': 0.60; 'entire': 0.61; 'simply': 0.61; 'between': 0.67; 'statement,': 0.68; 'default': 0.69; 'received:fios.verizon.net': 0.84; 'shell,': 0.91; 'whereas': 0.91; 'differences': 0.93; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Classes and the command line Date: Tue, 28 Oct 2014 00:08:27 -0400 References: <8uar4a1pa6d631ktr33h8rau1ilf2rjvi3@4ax.com> <85mw8i1aak.fsf@benfinney.id.au> <0d42e474-a864-4155-b602-e4659899fffd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-108-16-203-145.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 1414469330 news.xs4all.nl 2916 [2001:888:2000:d::a6]:58406 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79820 On 10/26/2014 11:24 PM, Chris Angelico wrote: > On Mon, Oct 27, 2014 at 2:18 PM, Rustom Mody wrote: >> On Monday, October 27, 2014 8:40:48 AM UTC+5:30, Chris Angelico wrote: >>> You can get block-by-block history by using Idle. I find that fairly >>> convenient for manipulating class/function definitions. >>> >>> ChrisA >> >> Umm... Nice! >> A bit inconsistent in that the '...' does not appear. >> But thats good; makes copy|cut-pasting from interpreter to file >> a mostly trivial operation. One of the differences between console interpreter and Idle Shell is that the former is line oriented whereas Shell is statement oriented. In the console interpreter, you cannot edit a line after it is entered. In Shell, you can edit any line until you enter an entire statment. Similarly, c. i. history recalls a line at a time. Recalling an multiline statment has to be done a line at a time, in order. Shell history recalls an entire statement, even if multiple lines (this is what Chris means by 'blocks'). Explaining this difference as the reason for no ... is on my todo list. > It's inconsistent only because the default sys.ps2 is those dots, > which aren't necessary in Idle. You could make it consistent by simply > changing sys.ps2. Nope. User code is executed in the user process. Its only effect on the Idle process is to write to stdout or stderr for display. There is tracker issue about letting users change sys.ps1 *in the Idle process*, but it would have to be through the menu or config dialog. -- Terry Jan Reedy