Jscomp is a project mainly written in Python, it's free.
Python objects which output themselves as javascript
This project is an attempt to make python code which can generate javascript.
The code is available under the Apache Licence 2.0 http://www.opensource.org/licenses/Apache-2.0