PyChecker must execute script?

Trent Mick trentm at
Wed Feb 5 22:44:50 CET 2003

[Geoff Gerrietts wrote]
> 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.

To be more specific. If you put all top-level executing code within a
    if __name__ == "__main__":
        # top-level code here
block then you will be fine.


Trent Mick
TrentM at

More information about the Python-list mailing list