Created
May 17, 2011 01:03
-
-
Save aza/975684 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import BaseHTTPServer | |
import SimpleHTTPServer | |
PORT = 8000 | |
def run(server_class=BaseHTTPServer.HTTPServer, | |
handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler, | |
port=PORT): | |
server_address = ('', port) | |
print "Serving files in '%s' on port %d." % (os.getcwd(), port) | |
httpd = server_class(server_address, handler_class) | |
httpd.serve_forever() | |
if __name__ == '__main__': | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment