Question on how to supress console logging from BaseHTTPServer Module?
David Lees
DavidLNoSpammy at raqia.com
Thu May 24 09:30:34 EDT 2001
Thanks, this works great. I am an OO newbie or I would have immediately
done this. I added:
class QuietBaseHTTPRequestHandler(BaseHTTPRequestHandler):
def send_response(self, code, message=None):
pass
One minor thing, I still had to go to the BaseHTTPServer.py module and
add the subclassing, rather than having it in my program code. Clearly
there is something really basic about namespace that I am missing. Any
idea what the problem is?
David Lees
Alex wrote:
>
> Probably the best way is to subclass BaseHTTPServer and overwrite the
> log_request method. Something like
>
> class quietHTTPServer(BaseHTTPServer):
>
> def log_request(self, code): pass
>
> HTH
> Alex.
More information about the Python-list
mailing list