Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98458
| From | "Robinson, Wendy" <RobinsW1@sutterhealth.org> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | RE: Puzzled |
| Date | 2015-11-06 13:36 -0800 |
| Message-ID | <mailman.133.1446996979.16136.python-list@python.org> (permalink) |
| References | <4CFEDC132D44AC49BA0E91FBEB947119084A742852@DCBL123VX.root.sutterhealth.org> <201511011020.tA1AKYAM004182@fido.openend.se> <4CFEDC132D44AC49BA0E91FBEB947119084A8D5E6C@DCBL123VX.root.sutterhealth.org> <563CADCD.8070307@gonnerman.org> |
Ah, ok.... I get it now.
Thanks both!
Wendy Robinson
Audit Analyst
-----Original Message-----
From: Chris Gonnerman [mailto:chris@gonnerman.org]
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 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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
RE: Puzzled "Robinson, Wendy" <RobinsW1@sutterhealth.org> - 2015-11-06 13:36 -0800
csiph-web