Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'anyway.': 0.05; 'subject:script': 0.09; 'subject:How': 0.10; 'cc:addr:python- list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'repl': 0.16; 'semicolon': 0.16; 'separated': 0.16; 'subject:run': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; '(by': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'statement': 0.30; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'spam,': 0.31; 'steven': 0.31; 'though.': 0.31; 'fri,': 0.33; 'subject:from': 0.34; 'could': 0.34; 'agree': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'idle': 0.36; 'doing': 0.36; 'subject:?': 0.36; 'fact': 0.38; 'does': 0.39; '30,': 0.65; 'shell,': 0.91; '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=dG/yTnRwzOFDipY1B7n5/CHhY9kSV07znEOcxROsiLs=; b=jl7cD6QPW/IpmlSHT17Ob+UFlb0qjaOLf0xYmHi6JY1SydsxqPi6mkPmDWfSWxA8Lg v2L2cPdx8pgN56YtjwhC6+4xfYyGKPtvVffRjLhtyLX4uiB/Kid3QYUtfwXNqpoE2CuE 8M9UO7e9alEzTHK9FxWtRGozhYPhf5HgKy9XjZzWH0I6WVeb3mPNi0HExit+T0lq07EN jDGCOq4UN8Uo1khbj+kgP7LMmLNG7jp2wEVeZyBq3wpPvKd73jNjFe93BoeMUD+6Zcil I1+XceftTLjlAXDMd0cGdScSffP2ndSDF0kbyyhSQIHogtNK4vjdCTkcT86xPjO2nbC1 g3jQ== MIME-Version: 1.0 X-Received: by 10.220.106.7 with SMTP id v7mr5045320vco.46.1401410795007; Thu, 29 May 2014 17:46:35 -0700 (PDT) In-Reply-To: <5387d1c4$0$29978$c3e8da3$5496439d@news.astraweb.com> References: <6e96c4c4-17db-464b-b291-816c534b70c4@googlegroups.com> <5386a7e2$0$11109$c3e8da3@news.astraweb.com> <5387d1c4$0$29978$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 30 May 2014 10:46:34 +1000 Subject: Re: How to run script from interpreter? 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: 14 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1401410797 news.xs4all.nl 2869 [2001:888:2000:d::a6]:50445 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:72266 On Fri, May 30, 2014 at 10:33 AM, Steven D'Aprano wrote: > (By the way, ; won't work for a Python shell, because ;spam already is > valid Python syntax: it's an empty statement followed by the statement > spam, separated by a semicolon.) That's not really a problem, though. It's not going to stop you from doing something actually *useful*, and the fact that the semicolon could be syntactically valid isn't going to come into it, because the REPL would swallow it anyway. But I agree that IDLE does not need a "drop to shell" mode. ChrisA