[Tutor] Best way to write this countdown code
Steven D'Aprano
steve at pearwood.info
Sat Jan 12 11:48:30 EST 2019
On Sat, Jan 12, 2019 at 09:44:21AM -0600, Joseph Gulizia wrote:
> Thanks in advance as I've gotten wordy.
>
> I want to integrate the following working code into a website:
[...]
Start with a simpler question: how would you integrate *any* Python code
into a website?
Few (i.e. no) browsers directly support Python. This is why nearly all
client-side (running in the brower) web development is done in
Javascript. Server-side code can be written in Python, or any other
language (Perl and PHP are other common choices) but for code that runs
in the browser, it is difficult to use anything but Javascript.
But all is not quite lost:
http://www.skulpt.org/
https://duckduckgo.com/?q=python+in+the+browser
Start by getting a simple "Hello World" type program running in the
browser, and then move on to something more ambitious.
--
Steve
More information about the Tutor
mailing list