E
Eric Spaulding
Is there an easy way to pass arguments to a handler class that is used
by the standard TCPServer?
normally --> srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass)
I'd like to be able to: srvr =SocketServer.TCPServer(('',port_num),
TCPHandlerClass, (arg1,arg2))
And have arg1, arg2 available via TCPHandlerClass.__init__ or some other
way.
Where TCPHandlerClass:
class TCPHandlerClass(SocketServer.StreamRequestHandler):
def handle(self):
#handle stream events here#
Thanks for any advice.
by the standard TCPServer?
normally --> srvr =SocketServer.TCPServer(('',port_num), TCPHandlerClass)
I'd like to be able to: srvr =SocketServer.TCPServer(('',port_num),
TCPHandlerClass, (arg1,arg2))
And have arg1, arg2 available via TCPHandlerClass.__init__ or some other
way.
Where TCPHandlerClass:
class TCPHandlerClass(SocketServer.StreamRequestHandler):
def handle(self):
#handle stream events here#
Thanks for any advice.