Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +---------------------------------+
- | for tests http:/localhost:8888 |
- +---------------------------------+
- #!/usr/bin/env python3
- import os, sys
- from http.server import HTTPServer, CGIHTTPRequestHandler
- webdir="."
- port=8888
- os.chdir(webdir)
- srvraddr=("",port)
- srvrobj=HTTPServer(srvraddr,CGIHTTPRequestHandler)
- srvrobj.serve_forever()
Advertisement
Add Comment
Please, Sign In to add comment