That being said, it looks fantastic. :)
Disclaimer - I do not know JavaScript.
You can embed this in a web app and write your client-side code in python-syntax. Would work specially well if you server-side code is also in python.
Coffeescript is mostly just javascript shorthand; Python on the otherhand has language features with no javascript equivalent (I'm thinking keyword arguments, generator functions, classes, and especially super() here)
That being said, I think to make this project really work you're going to be responsible for documenting the dom, and providing support for libraries like jQuery.
Thanks for the confusion -- I've made the first paragraphs more clear about PJ's scope.
Title changed: s/compiler/syntax cross-compiler/ EDIT: title changed again
print(...) is a common debugging, or output call in python, and I can see how in many use cases that would translate to console.log in javascript.
However, some browsers don't support console.log, and in serverside javascript, objects like console and window are not available. I don't know of any common output technique that would work in all browsers as well as with node.js and ringo. Depending on how much you care about supporting serverside js and different browsers, this may be a non-issue.
pj.transformations.special.Call_print
to have the emitted code check if you've defined a print function, using console.log only if you haven't. ((typeof print !== "undefined" && print !== null) || console.log)(...)Key difference between Pyvascript and the other compilers I've seen is a facility for macros performing arbitrary AST manipulations. E.g. in the Pylons environment, you can use _uriOf(Controller.someAction) to have it generate a url in your JS code at compile-time.
Always nice to see competition among compilers, though.
http://github.com/jedediah/prettyscript
I abandoned it when CoffeeScript appeared, but you might find something interesting there.
I may still write a limited one for use in creating code blocks in my project MongoAlchemy (http://mongoalchemy.org/).
http://mozakai.blogspot.com/2010/07/experiments-with-static-...