Python is easy?
djc at object-craft.com.au
Tue Aug 13 04:56:48 CEST 2002
> A Python evangelist keeps telling me I need to try Python as it is
> so much quicker and easier to develop in then Java. Bottom line is I
> think the ease of learning is dependent on the quality of your
> teacher/support than wholly on the language.
> I keep getting this error using ActiveStates win2k install 2.2:
> >>> test1.py
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> NameError: name 'test1' is not defined
The >>> is the interactive interpreter prompt where you are expected
to enter valid python statements. The name of a file which contains
python code is not a valid python statement. You could get something
close to what you were expecting by doing this:
>>> import test1
To run your program from the Windows command prompt you should do this:
d:\Python22\Lib\site-packages\jds> python test1.py
> Can anyone assist here? My evangelist can't figure it out...
Hope I haven't added to the confusion.
More information about the Python-list