print "server initializing..."
import SimpleHTTPServer
import SocketServer

print "packages imported..."

PORT = 8000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()
#!/usr/local/bin/python
print "server initializing..."
import SimpleHTTPServer
import SocketServer

print "packages imported..."

PORT = 8000

Handler = SimpleHTTPServer.SimpleHTTPRequestHandler

httpd = SocketServer.TCPServer(("", PORT), Handler)

print "serving at port", PORT
httpd.serve_forever()

Make python server executable