Compile without execute for syntax check?

Aahz Maruch aahz at netcom.com
Mon Mar 13 18:39:45 EST 2000


In article <8a3437$er1$1 at newsserver.rrzn.uni-hannover.de>,
Bernhard Reiter <breiter at usf.Uni-Osnabrueck.DE> wrote:
>
>The python interpreter in the non inspecting mode(default) finds
>some python syntax errors directly before running the code.
>
>Call me old fashioned, but the documentation is not clear about how
>to use this build-in syntax check on scripts without executing them.
>Nothing in the FAQ ether.

See FAQ entry 4.49, sort of.  What that doesn't tell you is that simply
doing an import of a module will produce the .pyc (and incidentally
perform the syntax check you request).  I may write a FAQ entry
explaining this in a bit more detail.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Three sins: BJ, B&J, B&J  --Aahz



More information about the Python-list mailing list