syntax checker in python

Diez B. Roggisch deets at nospam.web.de
Fri Aug 7 20:31:48 EDT 2009


horos11 schrieb:
> ps - I just realized that it isn't enough to do:
> 
> python -c 'import /path/to/script'
> 
> since that actually executes any statement inside of the script
> (wheras all I want to do is check syntax)
> 
> So - let me reprhase that - exactly how can you do a syntax check in
> python? Something like perl's -c:

See pylint & pychecker.

Diez




More information about the Python-list mailing list