I
I
Igor2015-11-13 02:28:47
Python
Igor, 2015-11-13 02:28:47

Is it possible to write simple browser applications in Python or Lua, without Javascript?

It is necessary to write simple browser applications with canvas, etc.
I know Javascript, but I will write the project for the soul, and using a language that is not my favorite will be annoying.
Are there tools today to use Python 3 or Lua for this?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Valery Serov, 2015-11-13
@DrBronson

Not

S
Sergey, 2015-11-13
Protko @Fesor

you can try your luck with python > js transpilers like this . or pypy.js And so it remains to wait for web assembly
ps what people will not invent, just not to use babel.js and stop being stupid. The differences from python are not very big.

A
Alexander Taratin, 2015-11-13
@Taraflex

www.skulpt.org

N
Nikita Konin, 2015-11-13
@jkjkjirf

At one time, I also tried to find something for use in the python browser, instead of js, but, alas, there is no full-fledged replacement yet.
I was interrupted by CoffeeScript for a while, then I tried ES6 (the standard came out this summer) and stayed on it. So I recommend using it, translating the code to ES5 through babel and you will be happy.
Python

a = [1, 2, 3, 4]
list(map(lambda x: x * x, a))
>>> [1, 4, 9, 16]
for i in [1, 2, 3]:
    print(i)
>>> 1
>>> 2
>>> 3

ES6
let a = [1, 2, 3, 4]
a.map(x => x * x)
>>> [1, 4, 9, 16]
for(let i of [1, 2, 3])
    console.log(i)
>>> 1
>>> 2
>>> 3

Here , by the way, is a good book on ES6, I advise you to go over it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question