How Can I overide a function in an existing class
Eddie
edstar at optonline.net
Wed Sep 15 19:30:26 EDT 2004
> Trivialized example that I hope gives you the idea:
>
> # in your own file
>
> import BaseHTTPServer
> def replacementMethod(self):
> # only the good stuff
>
> BaseHTTPServer.SomeClass.someMethod = replacementMethod
>
> Any help?
>
> -Peter
Thanks Peter. This is exactly what I was looking for. It works
perfectly and is very simple.
Thanks again
Eddie
More information about the Python-list
mailing list