parameters: (self, host='', port=0, timeout=-999, source_address=None)
return_statement: return self.welcome
docstring: Connect to host.  Arguments are:
           - host: hostname to connect to (string, default previous host)
           - port: port to connect to (integer, default previous port)
           - timeout: the timeout to set against the ftp socket(s)
           - source_address: a 2-tuple (host, port) for the socket to bind
             to as its source address before connecting.
docstring_summary: Connect to host.  Arguments are:
           - host: hostname to connect to (string, default previous host)
           - port: port to connect to (integer, default previous port)
           - timeout: the timeout to set against the ftp socket(s)
           - source_address: a 2-tuple (host, port) for the socket to bind
             to as its source address before connecting.
docstring_tokens: Connect to host . Arguments are : - host : hostname to connect to ( string default previous host ) - port : port to connect to ( integer default previous port ) - timeout : the timeout to set against the ftp socket ( s ) - source_address : a 2 - tuple ( host port ) for the socket to bind to as its source address before connecting .
function: def connect(self, host='', port=0, timeout=-999, source_address=None):
          '''Connect to host.  Arguments are:
           - host: hostname to connect to (string, default previous host)
           - port: port to connect to (integer, default previous port)
           - timeout: the timeout to set against the ftp socket(s)
           - source_address: a 2-tuple (host, port) for the socket to bind
             to as its source address before connecting.
          '''
          if host != '':
              self.host = host
          if port > 0:
              self.port = port
          if timeout != -999:
              self.timeout = timeout
          if source_address is not None:
              self.source_address = source_address
          self.sock = socket.create_connection((self.host, self.port), self.timeout,
                                               source_address=self.source_address)
          self.af = self.sock.family
          self.file = self.sock.makefile('r', encoding=self.encoding)
          self.welcome = self.getresp()
          return self.welcome
function_tokens: def connect ( self , host = '' , port = 0 , timeout = - 999 , source_address = None ) : if host != '' : self . host = host if port > 0 : self . port = port if timeout != - 999 : self . timeout = timeout if source_address is not None : self . source_address = source_address self . sock = socket . create_connection ( ( self . host , self . port ) , self . timeout , source_address = self . source_address ) self . af = self . sock . family self . file = self . sock . makefile ( 'r' , encoding = self . encoding ) self . welcome = self . getresp ( ) return self . welcome