On Sep 30, 2010, at 1:51 AM, Zubin Mithra wrote:

> However, I am confused on how to write data over to a particular player(0 or 
> 1). Is there any way I could choose to write to a particular object?
> 

Sure, make self.factory.connections into a dictionary which maps player names 
to connection objects, instead of a simple list.  Or simply do:

for connection in self.factory.connections:
  if connection.username == 'desired-username':
    connection.doSomething()

This isn't really a twisted question, it's a basic Python question :).



_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to