Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2a.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; 'interpreter.': 0.07; 'sys': 0.07; 'executed': 0.09; 'pretend': 0.09; 'subject:command': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; "wouldn't": 0.14; 'dialog.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'idle.': 0.16; 'letting': 0.16; 'posting,': 0.16; 'reedy': 0.16; 'should.': 0.16; 'stderr': 0.16; 'stdout': 0.16; 'subject:Classes': 0.16; 'wrote:': 0.18; 'work,': 0.20; '>>>': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'config': 0.24; 'cc:2**0': 0.24; 'tracker': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'skip:( 20': 0.30; 'work.': 0.31; 'code': 0.31; 'though.': 0.31; 'linux': 0.33; 'everyone': 0.33; 'totally': 0.33; 'subject:the': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'consistent': 0.36; 'idle': 0.36; 'changing': 0.37; 'issue': 0.38; 'pm,': 0.38; 'that,': 0.38; 'does': 0.39; 'users': 0.40; 'simply': 0.61; 'more': 0.64; 'talking': 0.65; 'default': 0.69; 'honest': 0.78; '2014,': 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/UDTa11t3R049Vp1b6XCpBS6Hsk97QRBGi2V8PMWHt0=; b=q4Ev4Xt7J3zzC23bYxf4NHQlyhagrRe5bd2kpaaPsfc4d6GKiCAJwZIMNNgFA3mhZA ly3spUFiklwpqO+bh2LHPZMFyS9Xko6OHVoQ16wotMMWeGC2waXxEFiUtO/8xoL3lh0E 6yWpfaOAKVdItW6HDCLRIDI1k+sOnWFlXT9Oq/Dt9Fi0LCu9t/81RoHftccb7Fmxb6M8 JphIpbI22/hRJfYsZVS1b5q9dAeagabIIu6mplDlBu9rgEGryCLY706B8mFnJCcB/KJL 9afvUpCsfr7b9CmJhmxkaSpLObDwHGDWEF1zstKp8iM44BWuNrOH0UsfCThhH4Wm/1v2 j7Cw== MIME-Version: 1.0 X-Received: by 10.43.63.17 with SMTP id xc17mr1539527icb.50.1414472230386; Mon, 27 Oct 2014 21:57:10 -0700 (PDT) In-Reply-To: References: <8uar4a1pa6d631ktr33h8rau1ilf2rjvi3@4ax.com> <85mw8i1aak.fsf@benfinney.id.au> <0d42e474-a864-4155-b602-e4659899fffd@googlegroups.com> Date: Tue, 28 Oct 2014 15:57:10 +1100 Subject: Re: Classes and the command line From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1414472238 news.xs4all.nl 2883 [2001:888:2000:d::a6]:39268 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:79823 On Tue, Oct 28, 2014 at 3:08 PM, Terry Reedy wrote: >> 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. I knew that, honest I did... umm, let's just pretend I was talking about changing sys.ps2 in the console interpreter. Yeah. Because I totally knew that changing it in Idle wouldn't work. Plus, I tested it before posting, like everyone should. Honest! Changing it in the console interpreter does work, though. Python 3.5.0a0 (default:301b9a58021c, Oct 2 2014, 09:20:24) [GCC 4.7.2] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.ps2=" " >>> def x(): pass >>> And if you want consistency, that's a good way to get it. ChrisA