> python -c "import py_compile; py_compile.compile(r'FILENAME')" > > ... where FILENAME is the filename of the python script you want to check. > > What this does in practice is (trying to) compile the source, and any > errors or warnings will be reported. better written: python -mpy_compile FILENAME also see compileall Matt