In ubuntu 12.04 i have this basic http server:
python -m SimpleHTTPServer
And this file demo.py
#!/usr/bin/python2.7
print "Content-Type: text/html"
print
print """\
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
"""
However when I open: http: //127.0.0.1:8000/demo.py
i receive a page with the demo.py literal in the browser. Obviously what is expected is hello world.
What is the problem? any idea?