Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Robinson, Wendy" Newsgroups: comp.lang.python Subject: RE: Puzzled Date: Fri, 6 Nov 2015 13:36:00 -0800 Lines: 39 Message-ID: References: <4CFEDC132D44AC49BA0E91FBEB947119084A742852@DCBL123VX.root.sutterhealth.org> <201511011020.tA1AKYAM004182@fido.openend.se> <4CFEDC132D44AC49BA0E91FBEB947119084A8D5E6C@DCBL123VX.root.sutterhealth.org> <563CADCD.8070307@gonnerman.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de Ej+3Dn8TFBhUpMyEYM7YawGjLCtXGFturnqbWIPSRMNQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'friday,': 0.07; 'works.': 0.07; 'cmd': 0.09; 'files"': 0.09; 'script,': 0.09; 'type:': 0.09; 'python': 0.10; 'interpreter': 0.15; 'message-----': 0.15; 'variables': 0.15; 'ah,': 0.16; 'email name:[mailto:chris': 0.16; 'helps.': 0.16; 'received:10.155': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'to:addr:chris': 0.16; 'wendy': 0.16; '>>>': 0.20; 'windows': 0.20; '2015': 0.20; 'to:2**1': 0.21; 'meant': 0.22; '64-bit': 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; 'installed': 0.26; 'chris': 0.26; 'yesterday': 0.27; 'fine': 0.28; 'environment': 0.29; 'work.': 0.30; "can't": 0.32; 'morning': 0.32; 'run': 0.33; 'skip:- 10': 0.34; 'file': 0.34; 'gives': 0.35; 'sent:': 0.35; 'cc:': 0.35; 'subject:': 0.35; 'but': 0.36; 'basic': 0.36; 'email addr:python.org': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'say': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'charset:us-ascii': 0.37; 'doing': 0.38; 'no,': 0.38; 'test': 0.39; 'from:': 0.39; 'to:addr:python.org': 0.40; 'some': 0.40; 'hope': 0.61; 'programs': 0.62; 'said:': 0.66; 'email name:python-list': 0.67; 'prompt': 0.79; 'received:10.152': 0.84; 'sfxlen:1': 0.91; 'audit': 0.93 Thread-Topic: Puzzled Thread-Index: AdEYmNDVNYJPvjdoTf+UeZt3YKAdyQAQjc0A In-Reply-To: <563CADCD.8070307@gonnerman.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US X-TM-AS-Product-Ver: SMEX-10.2.0.1135-7.500.1018-21926.002 X-TM-AS-Result: No--8.965700-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-CFilter-Loop: Scanned X-Mailman-Approved-At: Sun, 08 Nov 2015 10:36:18 -0500 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:98458 Ah, ok.... I get it now. Thanks both! Wendy Robinson Audit Analyst -----Original Message----- From: Chris Gonnerman [mailto:chris@gonnerman.org]=20 Sent: Friday, November 06, 2015 5:40 AM To: python-list@python.org Cc: Robinson, Wendy Subject: Re: Puzzled Wendy said: > I installed Python 3.5.0 64-bit for Windows yesterday and tried some basi= c 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 scri= pt, from the CMD prompt you type: python test.py If test.py is a module meant to be imported, then from the Python prompt yo= u do this: import test Hope this helps. -- Chris.