how to run .py file in browser using python webserver
<p>i have running a python webserver by using this simple script -</p>

<pre><code>    from http.server import SimpleHTTPRequestHandler as RH
    from socketserver import TCPServer

    ServerName='localhost'
    OnPort=8000
    print ("Server is running at Port 8000")
    TCPServer((ServerName, OnPort), RH).serve_forever()
</code></pre>

<p>it is running good and run my index.html file but it is not run .py file in browser when i type -- 
   <a href="http://localhost:8000/myfile.py" rel="nofollow">http://localhost:8000/myfile.py</a></p>

<p>it just show my python codes as it is i write in file ,it is not execute the code please help me to run my python file (.py) in browser by using this webserver only ,i don't want to use any framework or another webserver.</p>

<p>Is there any way to make a virtual host in this python server like apache.
if possible please suggest me that how to do this and any configuration file need to be configured or not.</p>

<p>thanx...</p>
