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