tn.write('exit\n') btw, telnetnetlib can be tricky and things varies depending on your FTP server and environment setup. you might be better off looking into something like pexpect to automate login and user interaction over telnet.
tn.write('exit\n') btw, telnetnetlib can be tricky and things varies depending on your FTP server and environment setup. you might be better off looking into something like pexpect to automate login and user interaction over telnet.