parameters: (self, data)
docstring: Send `data' to the server.
docstring_summary: Send `data' to the server.
docstring_tokens: Send data to the server .
function: def send(self, data):
          """Send `data' to the server."""
          if self.sock is None:
              if self.auto_open:
                  self.connect()
              else:
                  raise NotConnected()
  
          if self.debuglevel > 0:
              print "send:", repr(data)
          blocksize = 8192
          if hasattr(data,'read') and not isinstance(data, array):
              if self.debuglevel > 0: print "sendIng a read()able"
              datablock = data.read(blocksize)
              while datablock:
                  self.sock.sendall(datablock)
                  datablock = data.read(blocksize)
          else:
              self.sock.sendall(data)
function_tokens: def send ( self , data ) : if self . sock is None : if self . auto_open : self . connect ( ) else : raise NotConnected ( ) if self . debuglevel > 0 : print "send:" , repr ( data ) blocksize = 8192 if hasattr ( data , 'read' ) and not isinstance ( data , array ) : if self . debuglevel > 0 : print "sendIng a read()able" datablock = data . read ( blocksize ) while datablock : self . sock . sendall ( datablock ) datablock = data . read ( blocksize ) else : self . sock . sendall ( data )