[Python-Dev] No "check syntax" command line option

Guido van Rossum guido@python.org
Sat, 04 May 2002 17:48:10 -0400

> I just realized (after being prompted by the makers of BBEdit, a 
> very fine programmers editor for the Mac) that Python doesn't 
> appear to have a "check syntax only" switch, like Perl and other 
> languages do have. They'd like to have this, for (you guessed 
> it) their "check syntax" command.
> Is there a roundabout way to do this?

It should be trivial to write a script that uses the built-in function
compile() on the text of a given module.  No need to add another
command line switch (that's not "the Python way" :-).

--Guido van Rossum (home page: http://www.python.org/~guido/)