How to add python to HTML
Mendelevium

Hi, I've looked up different ways to add python to HTML, but none seem to work. Does anyone know how to add python into an HTML page?

You are viewing a single comment. View All
AdCharity

@Vandesm14 While it isn't exactly possible to add python to HTML, it is very possible to mix programming languages, such as making web servers with python. For instance, here: https://repl.it/talk/ask/Mixing-languages-in-one-repl/7063
Be sure to close out this post (meaning mark the official answer) if you got your answer :) Btw. this is kind of a duplicate of https://repl.it/talk/ask/Mixing-languages-in-one-repl/7063
The easiest way to put this is basically:

In addition, you could technically make an iframe of a repl with python.... but that's kind of fishy

Mendelevium

Thank you so much for the link, @AdCharity

AdCharity

@Mendelevium no problem :)

RiaDebnath1

@AdCharity Hello, when I use this I get 'Internal Server Error' and

"The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

any idea how to fix? :)

AdCharity

@RiaDebnath1
well to start // are commas for javascript so you'd have to change those. Also, there is a specific way to set up the "render template" function. The file structure will have to look like this:

RiaDebnath1

@AdCharity I'm so sorry but I'm doing this and still getting an error? Can I please add you to collaborate on the program?

AdCharity

@RiaDebnath1 Hey please check out the official flask documentation, there's some quick start examples.