Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'tutorial': 0.03; 'subject:Python': 0.06; 'interpreter.': 0.07; 'versions.': 0.07; 'steve': 0.09; 'executed': 0.09; 'scripting': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; 'jan': 0.12; '"python",': 0.16; '.py': 0.16; 'bash,': 0.16; 'distinct': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'hayes': 0.16; 'invokes': 0.16; 'stupid,': 0.16; 'subject:usage': 0.16; 'language': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'work,': 0.20; 'shell': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'script.': 0.24; 'cc:2**0': 0.24; 'this:': 0.26; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; '(like': 0.30; 'dos': 0.30; 'message-id:@mail.gmail.com': 0.30; '(which': 0.31; '"",': 0.31; '>>>>': 0.31; 'invoke': 0.31; 'file': 0.32; 'python.org': 0.32; '(including': 0.33; 'worked': 0.33; 'problem': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'version': 0.36; 'done': 0.36; 'easiest': 0.38; 'files': 0.38; 'pm,': 0.38; 'previous': 0.38; 'little': 0.38; 'how': 0.40; 'commands': 0.60; "you're": 0.61; 'choose': 0.64; 'different': 0.65; 'world': 0.66; 'between': 0.67; 'biggest': 0.67; 'prompt': 0.68; 'hey,': 0.75; 'etc),': 0.84; 'rexx,': 0.84; 'subject:survey': 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=Du8cz9yKjSV7cSmzKCNGXG7SgLxuZ078W2j02KFe/6g=; b=QVpqCCeFw7a85+Um53uhy0pNdRJVBX7NK2OfWmNQAQvjf6xwT2SZ+Hs4l/qL8ORwBG wBWgeA1BMsJFNCuW892T6k301/TaDbUgHaYV/599GY0YYlJ1YcTpjbXthAc/saF6J75Y IRzcetAFsd8qINIhMP7dcLYnYnyWpde+9Jc0an1ihEQGYim4FbwGx0BT9ERzvEmHR74P BETb26dkW5FAcA4lxYfmHQWrX2zZnZ+REffgxr57B0Hdk37JhP3ITu6KYTrfz/Dyortq EF//mhwevmx7RSeigxvmWWpDrWzBxH/pnzx1hXvjJPKWaTHTpnM5f7cJvl+yyzH2nhbi 3BpQ== MIME-Version: 1.0 X-Received: by 10.66.160.2 with SMTP id xg2mr81212206pab.23.1388579998000; Wed, 01 Jan 2014 04:39:58 -0800 (PST) In-Reply-To: References: <52c3fe0b$0$29984$c3e8da3$5496439d@news.astraweb.com> Date: Wed, 1 Jan 2014 23:39:57 +1100 Subject: Re: Python 2.x and 3.x usage survey 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: 1388580001 news.xs4all.nl 2936 [2001:888:2000:d::a6]:58886 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62958 On Wed, Jan 1, 2014 at 11:38 PM, Steve Hayes wrote: > I was thinking or of this: > >>>> python g:\work\module1.py > File "", line 1 > python g:\work\module1.py > ^ > > Which gave a different error the previous time I did it. > > But, hey, it worked from the DOS prompt > > C:\Python32>python g:\work\module1.py > Hello Module World That's how you invoke a script. Python isn't fundamentally a shell scripting language (like bash, REXX, batch, etc), so there's a distinct difference between Python commands (which go into .py files or are executed at the ">>>" prompt) and shell commands (including "python", which invokes the Python interpreter). > The biggest problem I have is that when something doesn't work, I don't know > if I have done something stupid, or if it's just an incompatibility of the > different versions. Easiest way to eliminate the confusion is to match your tutorial and your interpreter. That's why I recommend going with the python.org tutorial; you can drop down the little box in the top left and choose the exact version of Python that you're running. It WILL match. ChrisA