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


Groups > comp.lang.python > #79820

Re: Classes and the command line

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 <python-python-list@m.gmane.org>
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 <tjreedy@udel.edu>
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> <mailman.15222.1414379411.18130.python-list@python.org> <0d42e474-a864-4155-b602-e4659899fffd@googlegroups.com> <CAPTjJmqKLhMnV6U-cEE8H-Qs2rPo8aYKfq1bCEMaZpbuhJsPMQ@mail.gmail.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 <CAPTjJmqKLhMnV6U-cEE8H-Qs2rPo8aYKfq1bCEMaZpbuhJsPMQ@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15249.1414469330.18130.python-list@python.org> (permalink)
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

Show key headers only | View raw


On 10/26/2014 11:24 PM, Chris Angelico wrote:
> On Mon, Oct 27, 2014 at 2:18 PM, Rustom Mody <rustompmody@gmail.com> 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

Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Classes and the command line Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-26 22:27 -0400
  Re: Classes and the command line Rustom Mody <rustompmody@gmail.com> - 2014-10-26 20:05 -0700
    Re: Classes and the command line Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-26 23:28 -0400
      Re: Classes and the command line Terry Reedy <tjreedy@udel.edu> - 2014-10-28 00:14 -0400
  Re: Classes and the command line Ben Finney <ben+python@benfinney.id.au> - 2014-10-27 14:06 +1100
    Re: Classes and the command line Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-26 23:32 -0400
      Re: Classes and the command line alister <alister.nospam.ware@ntlworld.com> - 2014-10-27 11:17 +0000
        Re: Classes and the command line Chris Angelico <rosuav@gmail.com> - 2014-10-27 22:33 +1100
      Re: Classes and the command line Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-27 09:34 -0400
  Re: Classes and the command line Chris Angelico <rosuav@gmail.com> - 2014-10-27 14:10 +1100
    Re: Classes and the command line Rustom Mody <rustompmody@gmail.com> - 2014-10-26 20:18 -0700
      Re: Classes and the command line Chris Angelico <rosuav@gmail.com> - 2014-10-27 14:24 +1100
      Re: Classes and the command line Rustom Mody <rustompmody@gmail.com> - 2014-10-26 20:30 -0700
      Re: Classes and the command line Terry Reedy <tjreedy@udel.edu> - 2014-10-28 00:08 -0400
      Re: Classes and the command line Chris Angelico <rosuav@gmail.com> - 2014-10-28 15:57 +1100
    Re: Classes and the command line Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-10-26 23:33 -0400

csiph-web