pychecker checks files by executing them ??

Just just at
Tue Jun 3 19:50:13 CEST 2003

In article <u1b7xkwr.fsf at>,
 Thomas Heller <theller at> wrote:

> Axel Kowald <kowald at> writes:
> > I got pychecker and installed it on my w2k machine as described. It
> > also seems to work, but when I do:
> > 
> > pychecker   it actually "executes", while
> > checking it. Is this the correct behaviour??
> > Obviously I would like to check my scripts without executing them. Any
> > idea what's going on ?
> > 
> pychecker imports them, not executes them.

Hm, I don't understand how you can make that distinction: if you import 
a module, it gets executed.

> Protect the main function or
> what it is in your case by the usual 'if __name__ == "__main__":' idiom
> (which you should do anyway IMO), and you are fine.

True. Yet it would be far better if PyChecker would analyze the compiled 
byte code instead of executing it. The same goes for pydoc btw.


More information about the Python-list mailing list