Syntax checking python...
Mike C. Fletcher
mcfletch at rogers.com
Fri Jan 31 17:56:49 EST 2003
Most practical approach (IMO):
Use a Python-aware editor (PythonWin, for instance), which
syntax-colours your source-code as you go. Sure, it doesn't catch
everything, but it'll highlight matching braces/brackets/parens as you
move about, check for string-literal endings, highlight keywords, and
generally attempt to show the code as understood by the interpreter.
If for some particular reason you really do need to do robust
pre-checking of files, see pychecker, or the compile module.
HTH,
Mike
Afanasiy wrote:
>In other languages, I can receive syntax errors without the script having
>to execute. Please do not let this hurt your feelings. I merely bring up
>the other languages as an example of what I mean and what I am used to.
>
>In Python, I will not receive a syntax error until the interpreter runs
>right into it. This is not very efficient for me during my development.
>
>Is there a way I can be notified of my typos without having to run the
>interpreter up to those mistakes? That is my question. No smartasses.
>
>
>
--
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
More information about the Python-list
mailing list