Puzzled
Laura Creighton
lac at openend.se
Thu Nov 5 18:10:45 EST 2015
In a message of Thu, 05 Nov 2015 12:48:11 -0800, "Robinson, Wendy" writes:
>Well... I still can't get this to work. I guess I'll just uninstall it.
>It's a bummer that there's no help on basic startup like this.
>
>Wendy Robinson
>Audit Analyst
>(916) 566-4994 phone
There is enormous amount of help available. But we need to know more
about what your problem is, and how it presents itself before we can
start tracking down what your problem is, which is why I wanted a
traceback.
>>Hi there,
>>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.
See, this is where your problem is. There is a conceptual problem in
understanding what you meant by 'tried some basic programs successfully'
versus 'running py files at the >>> prompt'.
Either you didn't use the Python console -- the thing that is showing
you the '>>>' yesterday, and thus the programs that were working
yesterday are now working every bit as well as they did then, and
your problem is that you do not know how to use the python console.
Or you did use the console before, and they worked there, and now
you have NameErrors.
I think the problem is the first sort.
I think that you opened up the python console and then
typed in something like 'myprogram.py' expecting the console
to run the myprogram. Instead you got something like this:
Python 3.5.0rc1 (default, Aug 12 2015, 14:57:46)
[GCC 5.2.1 20150808] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> myprogram.py
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'myprogram' is not defined
>>>
If this is what happened then your python is fine. You just do not
know how the interactive console works. It doesn't run files
like this.
See:https://docs.python.org/3.5/tutorial/introduction.html
You type code at the console and get responses back.
If, on the other hand, this is not your problem, then we need a
traceback --- and what I posted above was a traceback -- so that
we can see what caused the NameError.
Laura
More information about the Python-list
mailing list