newbie:Strange Error

Jeff Shannon jeff at ccvcorp.com
Thu Aug 23 20:51:10 EDT 2001


Damon wrote:

> .......

> 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 :-)

Well, actually, the "official" python interpreter is the python.exe that
is used by the dos prompt/doubleclick method;  IDLE is a gui environment
that wraps that interpreter.

I'm not sure why you're getting that SyntaxError, however.  I don't
normally use IDLE, so I don't know the usual procedure for running
scripts from it (PythonWin seems much friendlier to me, but it's a
personal preference).  However, I suspect that your problem comes from
the way in which the script is run.  I'm not sure where the reload() is
coming from--is that something you're typing into idle?  is it internal
to idle, and happening automatically when you select a menu option?
or.... ??  I'd guess that either idle is assuming too much about your
script, which idle-fork and python.exe don't, or else you are running
the script in an incorrect fashion through idle, but idle-fork is smart
enough to figure out what you want...   of course, I'm just flailing
about blindly here, so don't put *too* much faith in my guesses.  ;)

Jeff Shannon
Technician/Programmer
Credit International





More information about the Python-list mailing list