How to run a python script in browser? -
I want to display html in Python script in a browser How do I run this script so that I can see it in the browser? The code is still:
index.py
< Code> ### I have added the following to run a python in the browser and my header.html < P> and header.html
Lt;; DOCTYPE html> gt; & lt; html> gt; Top & gt; & gt; title & gt; A Python To Doe List & lt; / title & gt; & lt; link rel = "stylesheet "Type =" text / css "href =" "& gt; & gt; / head> gt; body & gt;
Basically you can use BaseHTTPServer in this way and run your code.
home.html
& lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Python | Home and lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; % (Message) s & lt; / Body & gt; & Lt; / Html & gt; And if you open http: // localhost: 8654 in your browser:
This is how easy template is working Does
Comments
Post a Comment