PyChecker must execute script?

Geoff Gerrietts geoff at gerrietts.net
Wed Feb 5 15:44:25 EST 2003


Quoting Afanasiy (abelikov72 at hotmail.com):
> I was hoping to find a typo/syntax checking solution so a
> long running script did not fail when it encountered them.
> 
> I spent the time to get the suggested PyChecker utility installed
> and have run it on one of the above-mentioned script files. Shortly
> thereafter, I killed it because it was just executing my script...
> 
> Is this simply how PyChecker works? That seems a little odd to me.

I believe PyChecker imports the modules, and analyzes the resulting
bytecode.

If you have not included an "if __name__ == '__main__':" conditional,
then it is likely that importing the module and running it will be
fundamentally identical.

--G.

-- 
Geoff Gerrietts        <geoff at gerrietts dot net>
"Ordinarily he was insane, but he had lucid moments 
when he was merely stupid."        --Heinrich Heine





More information about the Python-list mailing list