creating an object from base class

iogilvy at attglobal.net iogilvy at attglobal.net
Fri Apr 27 08:38:30 EDT 2007


i wish to have some extended functionality added to sockets

i can create my own socket class   class mysocket(socket.socket):

and all should be fine. Except, the sockets are created for me by the
accept method, listening on port. So how can i take the standard
socket created for me and create a 'mysocket'. I need a method that
will initialise any new properties i have added in my class, but how
can i change the class of the socket created?




More information about the Python-list mailing list