11

Are there any languages targeting JavaScript (like CoffeeScript) and written in Python? I found Pyjamas, but it’s GWT of Python as I see. I want a language that doesn’t need heavy runtime library and is able to be compiled to JavaScript. I found Mascara also, and it very satisfies my requirements except it’s license. CoffeeScript is ideal for me except it’s written in CoffeeScript itself. I have to compile [CoffeeScript-like language] source codes into JavaScript statically in Python application.

6
  • @Lion Oh, thanks. I removed it. Commented Dec 18, 2011 at 6:13
  • 1
    "CoffeeScript-like" as in "it's just JavaScript"? Because that's the primary purpose of CoffeeScript: Do what JS does, just in a nicer way. Please elaborate on what defined this "non-JavaScript-language". If the sole problem with CoffeeScript is that it's not written in CoffeeScript, you can run from Python via V8. Commented Dec 18, 2011 at 7:21
  • @delnan I wanted to say a language do what JavaScript does in a nicer way. Commented Dec 19, 2011 at 6:09
  • 7
    @Lion They are not "strictly prohibited" throughout the site, that is ludicrous. However, the majority of the community seems to discourage them. meta.stackexchange.com/questions/5029/… and meta.stackexchange.com/questions/2950/… Commented Dec 19, 2011 at 7:01
  • stackoverflow.com/questions/683462/… -This might be helpful. Commented Dec 23, 2011 at 20:42

3 Answers 3

6

You might want to have a look at pyjaco (python to javascript compiler).

Here's an example to get you started with manipulating the DOM in Python using jQuery: https://github.com/chrivers/pyjaco/tree/devel/examples/jquery

Sign up to request clarification or add additional context in comments.

Comments

2

Check this:

PyvaScript: http://www.allbuttonspressed.com/blog/django/2010/07/PyvaScript-Pythonic-syntax-for-your-browser

Pyjs: https://github.com/anandology/pyjs

Pyjamas: http://pyjs.org/

Comments

0

One part of Pyjamas is pyjs, which is decribed this way in the project overview:

pyjs translates Python code to Javascript by walking the Python abstract syntax tree and generating Javascript.

Sounds like it should fit the bill: no need to use the other parts of pyjamas you don't need.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.