newbie:Strange Error

Damon DimodC at excite.com
Thu Aug 23 19:42:15 EDT 2001


hello to all of you....

I m new to python and programming in general, so I ll
appreciate any help.

I m currently learning thru some tutorials i found on the web,
and in one of them there was this little script:

----------------------------------
psw = "haha"

while psw != "python" :
    psw = raw_input("Password:")
print "Welcome in."

----------------------------------

When i run it thru the IDLE i always get this error:

>>>
  File "<string>", line 1
    reload(pass)
              ^
SyntaxError: invalid syntax

>>

But if i run it thru IdleFork 0.8.1 then everything is ok
and i recieve no errors.The same goes if i double click
the .py file in its folder and run it thru an ms-dos window -
runs smoothly and give no error.
Only IDLE gives me that error.Anybody knows why?

If i didn't have IdleFork then i would think that the code for
the script has an error and maybe throw out the whole tutorial
and find another one,or try to find what's the error in the code.
But it seems that the code is ok (is it?) and i get an error only
from the official python interpreter :-)

I ll appreciate any help.
(i have python 2.1.1 on Win95 OEM-B)

Damon



More information about the Python-list mailing list