En Fri, 07 Aug 2009 17:29:28 -0300, horos11 <horo...@gmail.com> escribió:
I'm trying to make a syntax checker, where I say:
python -c "import /path/to/script"
to check the syntax of the script named '/path/to/script' (note: no py
extension needed). Of course this doesn't work because the
functionality for import is bundled up with the environment..
Try the py_compile module in the standard library:
http://docs.python.org/library/
The import statement does more than just checking syntax. You may want to
start the interpreter with the -tt option also.
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list