SHARE
TWEET

webs.py

a guest Nov 1st, 2012 196 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     #!/usr/bin/env python
  2.    
  3.     import SimpleHTTPServer
  4.     import SocketServer
  5.     import os
  6.      
  7.     port = 13123
  8.      
  9.     if __name__=='__main__':
  10.             os.chdir('/')
  11.             Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
  12.      
  13.             httpd = SocketServer.TCPServer(("", port), Handler)
  14.      
  15.             print("Now open this server on webbrowser at port : " + str(port))
  16.             print("example: http://maho.com:" + str(port))
  17.             httpd.serve_forever()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top