Answer the question
In order to leave comments, you need to log in
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
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.
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
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question