pyserv package
Submodules
Module contents
Simple HTTP server classes with GET path rewriting and request/header logging. Now includes a reference WSGI server and tftpdaemon script.
- class pyserv.GetHandler(*args, directory=None, **kwargs)[source]
Bases:
SimpleHTTPRequestHandler
Munge the incoming request path from Dialog OTA. Runs urlparse on the url and updates the GET handler path. We also log the result.
- Parameters:
SimpleHTTPRequestHandler – imported from http.server
- class pyserv.GetServer(iface, port, directory)[source]
Bases:
Thread
Threaded wrapper class for custom ThreadingHTTPServer instance.
Usage:
s = GetServer('', 8080) s.start() s.stop()