title: How to run a Python script in a web page
body: <p>I'm very new to Python. I just know what Python is.</p>
  <p>I have created the below code (in Python <a href="https://en.wikipedia.org/wiki/IDLE" rel="noreferrer">IDLE</a>):</p>
  <pre><code>print &quot;Hi Welcome to Python test page\n&quot;;
  print &quot;Now it will show a calculation&quot;;
  print &quot;30+2=&quot;;
  print 30+2;
  </code></pre>
  <p>Then I saved this page in my localhost as <em>index.py</em></p>
  <p>I run the script using</p>
  <p>http://localhost/index.py</p>
  <p>But it does not show the executed Python script. Instead, it showed the above code as HTML. Where is the problem? How can I run a Python file in a web page?</p>