Changeset 194

Show
Ignore:
Timestamp:
2002-05-26 23:57:13 (7 years ago)
Author:
schwa
Message:
Added EXAMPLE_PORT variable.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ftputil.txt

    r193 r194  
    166166import ftputil 
    167167 
     168EXAMPLE_PORT = 50001 
     169 
    168170class MySession(ftplib.FTP): 
    169171    def __init__(self, host, userid, password, port): 
    170         """Act like ftplib.FTP's constructor but connect to port x.""" 
     172        """Act like ftplib.FTP's constructor but connect to other port.""" 
    171173        ftplib.FTP.__init__(self) 
    172174        self.connect(host, port) 
     
    175177# try not to use MySession() as factory, - use the class itself 
    176178host = ftputil.FTPHost(host, userid, password, 
    177                        port=PORT, session_factory=MySession) 
     179                       port=EXAMPLE_PORT, session_factory=MySession) 
    178180# use `host` as usual 
    179181-----