Once upon a time I wrote Oink, which generates JS from Python on the server: https://github.com/alecthomas/oink
It has support for many of the Python niceties: classes, list comprehensions, positional arguments, and so on. Interesting experiment, but I ended up thinking that Python is not the best language for the browser.