Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Gonnerman Newsgroups: comp.lang.python Subject: Re: Puzzled Date: Fri, 6 Nov 2015 07:40:29 -0600 Lines: 22 Message-ID: References: <4CFEDC132D44AC49BA0E91FBEB947119084A742852@DCBL123VX.root.sutterhealth.org> <201511011020.tA1AKYAM004182@fido.openend.se> <4CFEDC132D44AC49BA0E91FBEB947119084A8D5E6C@DCBL123VX.root.sutterhealth.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 7bws0QVrk97D18a22nYfZA9d3Dlp8mwMuZCrvQoAD0gg== 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; 'correct.': 0.07; 'works.': 0.07; 'cmd': 0.09; 'files"': 0.09; 'script,': 0.09; 'type:': 0.09; 'python': 0.10; 'interpreter': 0.15; 'variables': 0.15; 'helps.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sfxlen:0': 0.16; 'wendy': 0.16; '>>>': 0.20; 'windows': 0.20; 'to:name :python-list@python.org': 0.20; 'cc:2**1': 0.22; 'meant': 0.22; '64-bit': 0.22; 'from:addr:chris': 0.22; 'trying': 0.22; 'seems': 0.23; 'this:': 0.23; 'tried': 0.24; 'import': 0.24; 'header:In- Reply-To:1': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'installed': 0.26; 'yesterday': 0.27; 'fine': 0.28; 'environment': 0.29; 'work.': 0.30; "can't": 0.32; 'morning': 0.32; 'run': 0.33; 'file': 0.34; 'gives': 0.35; 'but': 0.36; 'basic': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'say': 0.37; 'doing': 0.38; 'no,': 0.38; 'test': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'hope': 0.61; 'programs': 0.62; 'charset:windows-1252': 0.62; 'said:': 0.66; 'received:199': 0.72; 'prompt': 0.79 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <4CFEDC132D44AC49BA0E91FBEB947119084A8D5E6C@DCBL123VX.root.sutterhealth.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3270.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - gonnerman.org X-BWhitelist: no X-Source-IP: 199.127.49.110 X-Exim-ID: 1ZuhFl-0009Pd-Pn X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([10.0.1.176]) [199.127.49.110]:58579 X-Source-Auth: chris@newcenturycomputers.net X-Email-Count: 5 X-Source-Cap: bmV3Y2VudDtuZXdjZW50O2dhdG9yMzI3MC5ob3N0Z2F0b3IuY29t X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98354 Wendy said: > I installed Python 3.5.0 64-bit for Windows yesterday and tried some basic programs successfully. > This morning I rebooted my computer and can't get a single one to work. The interpreter seems to be fine and the environment variables look correct. But every py file I try to run at the >>> prompt gives me a NameError. But that's not how the Python interpreter works. You say you are trying to run "py files" at the >>> prompt. If what you are doing is this: >>> test.py Well, no, that's not going to work. If you want to run "test.py" as a script, from the CMD prompt you type: python test.py If test.py is a module meant to be imported, then from the Python prompt you do this: import test Hope this helps. -- Chris.