First, take a look at Brython's site. The clock is running, which is written in Python. Check in "View Source".
In other words, you can use Python instead of javascript. The work required to actually run it on your site is as follows. The location of the file is based on IIS as an example.
that's all. Let's try Brython!
hello.html
<html><head><script src="/brython.js"></script></head>
<body onload="brython()">
<script type="text/python">
def echo():
alert("hello %s !" % doc["zone"].value)
</script>
<p>Your name is : <input id="zone"><button onclick="echo()">clic !</button>
</p></body></html>
Recommended Posts