Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!newsfeed.freenet.ag!news2.euro.net!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.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.05; '(of': 0.07; 'sys': 0.07; 'subject:help': 0.08; 'seen,': 0.09; 'runs': 0.10; 'python': 0.11; '2.7.3': 0.16; 'merely': 0.16; 'received:74.208.4.195': 0.16; 'scripts.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; '>>>': 0.22; 'import': 0.22; 'aug': 0.22; 'putting': 0.22; 'header:User-Agent:1': 0.23; 'script.': 0.24; "i've": 0.25; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'chris': 0.29; 'am,': 0.29; "i'm": 0.30; 'lines': 0.31; '>>>>': 0.31; 'invoke': 0.31; 'run': 0.32; 'but': 0.35; 'version': 0.36; 'two': 0.37; 'depends': 0.38; 'hat': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'most': 0.60; 'real': 0.63; 'more': 0.64; 'line,': 0.68; 'received:74.208': 0.68; '1:47': 0.91; 'banner': 0.93; '2013': 0.98 Date: Tue, 09 Apr 2013 16:12:34 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: While loop help References: <596ca4b8-b5aa-4112-b086-6320108075f7@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:Pz3VO2hmr6ErTEm0WhndmtFxp7Huy/7lB0W8xnU3Q4k 2207KcEX+GbwH6PBSkGMethYkE+miQW6vOIZIVf1LEo3DV5ht7 7tq4Qc+l8609XBWWr4hfMlYwF7IJnbHM5HczNukAjYH52qdzYX crNzW7AoGCCclzfLU9C+QqoLBUtU0Xlt/1dHduX15jLaEr7ytl W/eaXAXjcKjDTN7EkbYeQw1TbAWZdHuE+W3gpzcdSTJbJU62se eClqBRKuSX9QNw6bIoHgnzetANEu8lluQvkbRpRUHEKUoBilwr hjZ79q82sRHnPLiwABL/39S8C5j5olDIyc6oj0s451AYoui8w= = 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: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365538374 news.xs4all.nl 2707 [2001:888:2000:d::a6]:41607 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43225 On 04/09/2013 03:35 PM, Walter Hurry wrote: > On Wed, 10 Apr 2013 02:10:29 +1000, Chris Angelico wrote: > >> On Wed, Apr 10, 2013 at 1:47 AM, wrote: >>> ... I'm not sure what version I'm using ... >> >> Try putting these lines into a Python script: >> >> import sys >> print(sys.version) >> > That works (of course), but in every Python version I've seen, one merely > needs to invoke the python interactive interpreter and the banner is > displayed: > > $ python > Python 2.7.3 (default, Aug 9 2012, 17:23:57) > [GCC 4.7.1 20120720 (Red Hat 4.7.1-5)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> quit() > $ > And if several are installed, that isn't necessarily the one that'll run when one runs a script. Depends on how the script is invoked (and on what OS is running), and on the shebang line, PATH, etc. The real point about those two lines is that they can be added to most scripts. -- DaveA