JavaScript parser in Python

Carl Waldbieser waldbie at
Wed Jun 4 09:32:29 CEST 2003

Does anyone know of a Python module that can parse a JavaScript source file?
I am intersted in checking the file to see if it is syntactically correct,
as well as possibly stripping out whitespace and comments.  I found a couple
JavaScript compression utilities after doing a Google search, but many of
them are themselves written in JavaScript, execute in a browser, and tend to
be somewhat slow for very large JavaScript files.  A pythonic solution has a
certain appeal to me because I have always found Python very easy an
intuitive to use in the past.  Thanks in advance.

Carl Waldbieser

More information about the Python-list mailing list