Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.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; 'subject:Python': 0.06; 'error:': 0.07; 'steve': 0.09; 'executable': 0.09; 'indicates': 0.09; 'typed': 0.09; 'python': 0.11; 'windows': 0.15; 'command,': 0.16; 'command.': 0.16; 'expects': 0.16; 'hayes': 0.16; 'statement.': 0.16; 'statments': 0.16; 'subject:usage': 0.16; 'language': 0.16; 'wrote:': 0.18; 'module': 0.19; 'command': 0.22; '>>>': 0.22; 'shell': 0.22; 'to:name:python-list@python.org': 0.22; 'error': 0.23; 'tells': 0.24; 'looks': 0.24; 'shown': 0.26; 'this:': 0.26; 'header:In- Reply-To:1': 0.27; 'dos': 0.30; 'message-id:@mail.gmail.com': 0.30; 'gives': 0.31; '"",': 0.31; '>>>>': 0.31; 'file': 0.32; 'run': 0.32; 'worked': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'january': 0.37; 'feed': 0.38; 'to:addr:python-list': 0.38; 'previous': 0.38; 'to:addr:python.org': 0.39; 'first': 0.61; 'different': 0.65; 'world': 0.66; 'prompt': 0.68; 'statement,': 0.68; 'hey,': 0.75; 'subject:survey': 0.84 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:to :content-type; bh=nncM6PLq4phxePiNDbIn00dFS0DHkfgacE/lzFGmnBM=; b=jLhJAVQ1XEAe3n+vSeqQdTzfQRFQt93VFadDGaPELHDA71e2Am0vqWws5lh3X7N3WU EO5mK3+M7Agzxk6VMaDBVKVvtcOxBqdBrc6Wsp/u5f4K08H1P4bMAPEufRKKTbxyu5aH kvDpz9Q9xQ6RTMfRPPQSBwnJj8RnwtNdwQcAYwILOcE72Cg0GhfCRdZEQM+osu7yQdND dKM3X3rSJz9icdSm6wljiuHp5ACSHWYzkMLfvdCA/7o1SKwQPL9+Qm22Z7gJWw2ZHrnF pIhudE6SAhF4diNFDYvpE2LyLqIL+h5n8HIp3Z2dDsVO/7cK5YZupMg0/j/DwKdoCwB+ 493Q== MIME-Version: 1.0 X-Received: by 10.204.234.202 with SMTP id kd10mr421832bkb.53.1388585275034; Wed, 01 Jan 2014 06:07:55 -0800 (PST) In-Reply-To: References: <52c3fe0b$0$29984$c3e8da3$5496439d@news.astraweb.com> Date: Thu, 2 Jan 2014 01:07:54 +1100 Subject: Re: Python 2.x and 3.x usage survey From: David To: "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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1388585277 news.xs4all.nl 2846 [2001:888:2000:d::a6]:39762 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62960 On 1 January 2014 23:38, 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 Your windows command shell prompt looks like this: "C:\Python32>" It indicates that windows shell is waiting for you to type something. It expects the first word you type to be an executable command. If you do this: C:\Python32>python g:\work\module1.py it tells the shell to run the python interpreter and feed it all the python statments contained in the file g:\work\module1.py If you do this: C:\Python32>python it tells the shell to run the python interpreter interactively, and wait for you to directly type python statements. When the python intepreter is ready for you to type a python statement, it gives you a ">>>" prompt. It expects you to type a valid python language statement. The reason this gave an error: >>> python g:\work\module1.py is because you are using the python interpreter as shown by ">>>", but you typed a windows shell command, not a python statement.