parameters: (self, s)
docstring: Send a pickled string to the socket.
  
          This function allows for partial sends which can happen when the
          network is busy.
docstring_summary: Send a pickled string to the socket.
docstring_tokens: Send a pickled string to the socket .
function: def send(self, s):
          """
          Send a pickled string to the socket.
  
          This function allows for partial sends which can happen when the
          network is busy.
          """
          if self.sock is None:
              self.createSocket()
          #self.sock can be None either because we haven't reached the retry
          #time yet, or because we have reached the retry time and retried,
          #but are still unable to connect.
          if self.sock:
              try:
                  if hasattr(self.sock, "sendall"):
                      self.sock.sendall(s)
                  else:
                      sentsofar = 0
                      left = len(s)
                      while left > 0:
                          sent = self.sock.send(s[sentsofar:])
                          sentsofar = sentsofar + sent
                          left = left - sent
              except socket.error:
                  self.sock.close()
                  self.sock = None
function_tokens: def send ( self , s ) : if self . sock is None : self . createSocket ( ) #self.sock can be None either because we haven't reached the retry #time yet, or because we have reached the retry time and retried, #but are still unable to connect. if self . sock : try : if hasattr ( self . sock , "sendall" ) : self . sock . sendall ( s ) else : sentsofar = 0 left = len ( s ) while left > 0 : sent = self . sock . send ( s [ sentsofar : ] ) sentsofar = sentsofar + sent left = left - sent except socket . error : self . sock . close ( ) self . sock = None