*** ftplib.py.orig Thu Feb 12 20:35:06 2004 --- ftplib.py Thu Oct 21 13:47:01 2004 *************** *** 44,49 **** --- 44,51 ---- except ImportError: import socket + from telnetlib import IAC + __all__ = ["FTP","Netrc"] # Magic number from *************** *** 751,756 **** --- 753,768 ---- """Return a sequence of lines which define a named macro.""" return self.__macros[macro] + + # This class implements RFC 959 more strictly. It implements + # ftp-over-telnet. Actually, it only doubles chr(255). + # What have to be done is to add telnt prefixes to urgent commands + # (ABORt). + + class TelnetFTP(FTP): + def putline(self, line): + line = line.replace(IAC, IAC+IAC) + FTP.putline(self, line) def test():