Running Python Script in HTML

I am working on a school project. I have already done a lot of Python Script and I was wondering if I can import python into html like javascript? How am I supposed to do this? An example is import time. I want to show the Time clock on my webpage from a python script.

+4
source share
3 answers

JS implements a python implementation. However, you cannot run python “natively” in a browser, you can run python code through javascript or compile python code in js (llvm emscripten)

You are looking for:

pypy.js:

PyPy.js - .

PyPy python, emscripten, JIT-, asm.js .


python

  • ( , pypy.js ) N-
  • js interpreter libs ( / Python),

, , , , , -. , , ...

+4

Python html JavaScript. JavaScript , Python. JavaScript, .

0

Here (I think), the closest you are going to do it. You can use Django and some of its functions:

https://docs.djangoproject.com/en/dev/howto/custom-template-tags/

0
source

Source: https://habr.com/ru/post/1619712/


All Articles