Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98458 > unrolled thread

RE: Puzzled

Started by"Robinson, Wendy" <RobinsW1@sutterhealth.org>
First post2015-11-06 13:36 -0800
Last post2015-11-06 13:36 -0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: Puzzled "Robinson, Wendy" <RobinsW1@sutterhealth.org> - 2015-11-06 13:36 -0800

#98458 — RE: Puzzled

From"Robinson, Wendy" <RobinsW1@sutterhealth.org>
Date2015-11-06 13:36 -0800
SubjectRE: Puzzled
Message-ID<mailman.133.1446996979.16136.python-list@python.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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web