Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import BaseHTTPServer
- from SimpleHTTPServer import SimpleHTTPRequestHandler
- Handler = SimpleHTTPRequestHandler
- Server = BaseHTTPServer.HTTPServer
- address = ('127.0.0.1', 8000)
- Handler.protocol_version = "HTTP/1.0"
- httpd = Server(address, Handler)
- info = httpd.socket.getsockname()
- print "HTTP running on", info[0], "port", info[1], "..."
- httpd.serve_forever()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement