Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CoffeeScript-like language written in Python

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.

like image 778
minhee Avatar asked Dec 18 '11 06:12

minhee


People also ask

Is CoffeeScript influenced by Python?

CoffeeScript is a programming language that compiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python, and Haskell in an effort to enhance JavaScript's brevity and readability.

Is CoffeeScript same as JavaScript?

CoffeeScript is a lightweight language that compiles into JavaScript. It provides simple and easy-to-learn syntax avoiding the complex syntax of JavaScript. CoffeeScript is influenced by JavaScript, Ruby, YAML, Haskell, Perl, Python and has influenced MoonScript, LiveScript, and JavaScript.

What language is better than Python?

JavaScript (Node. js) is orders of magnitude faster than Python, Ruby, and PHP. It is also nearly as fast as high-performance languages like C++, Java, and Go.


2 Answers

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

like image 88
jcollado Avatar answered Oct 23 '22 12:10

jcollado


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/

like image 26
ssbb Avatar answered Oct 23 '22 13:10

ssbb