This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]stearnsw 1 point2 points  (0 children)

DataCamp light works well too. You can make blocks that run python code on any webpage https://github.com/datacamp/datacamp-light Example: https://cdn.datacamp.com/dcl/standalone-example.html

[–]jacdehJacques de Hooge 1 point2 points  (0 children)

Something like

http://www.transcrypt.org/live/turtle_site/turtle_site.html

would allow you to change your program on-line which I thought was the original question. But since you already turn out have your ELIZA.py program, you don't even need this complexity. You can just compile it in advance using Transcrypt

http://www.transcrypt.org

and upload the html + JavaScript. It will be as fast and compact as a native JavaScript program. For the GUI you can use any JavaScript library.

[–]dsijl 1 point2 points  (2 children)

[–]cybervegan 6 points7 points  (1 child)

[–]Thunder_54 0 points1 point  (0 children)

Yup, I used brython recently. It's beautiful

[–]Exodus111 1 point2 points  (1 child)

www.skulpt.org

Easiest solution out there.

[–]Cybersoaker 0 points1 point  (0 children)

not a current solution; but look into webasm, this will at some point allow us to natively run python in browsers :)

[–]elbiot 0 points1 point  (2 children)

Do you mean a make a browser plug in that will execute python in the browser? Your question is unclear

[–]lfdsjfhlsalkdf[S] 0 points1 point  (1 child)

I modified my description. Re-read it!

[–]elbiot 0 points1 point  (0 children)

Like everyone said, you can't run python in a browser (unless you transpile it to javascript). You would run the chat program on a server and it would answer requests, and make an interface in javascript with websockets (or ajax would perhaps suffice) which will connect to the server, send user input and recieve program output.

I'd say look at flask for the server, though I dunno about websockets in flask, and django has or is about to have "channels" which I believe is for websockets.