Ho finalmente trovato la risposta, googlando ancora. Dopo la il login, basta aggiungere questa riga al codice:
ftp.set_pasv(False) Praticamente questo comando indica al codice di usare la porta ftp standard.. >----Messaggio originale---- >Da: marco...@libero.it >Data: 22/11/2011 16.58 >A: <python@lists.python.it> >Ogg: [Python] R: Re: FTP - error: [Errno 110] Connection timed out > >Ecco! > >http://paste.pocoo.org/show/511438/ > > >>----Messaggio originale---- >>Da: manlio.peri...@gmail.com >>Data: 22/11/2011 16.52 >>A: <python@lists.python.it> >>Ogg: Re: [Python] FTP - error: [Errno 110] Connection timed out >> >>-----BEGIN PGP SIGNED MESSAGE----- >>Hash: SHA1 >> >>Il 22/11/2011 16:33, marco...@libero.it ha scritto: >>> Ciao a tutti! >>> Sto cercando di fare un upload di un file su server FTP tramite python. >>> Uso Ubuntu Linux, e da terminale l'operazione riesce egregiamente. >>> >>> Se lo faccio con codice Python, dopo un po' mi termina con: >>> error: [Errno 110] Connection timed out >>> >>> Non riesco a capire quale possa essere il motivo. >> >>Riesci a postare il codice (minimale) che riproduce il problema (su un >>paste server, ad esempio paste.pocoo.org)? >> >>Non dimenticare di postare anche il traceback completo che ottieni. >> >>> [...] >> >> >>Ciao Manlio >> >>-----BEGIN PGP SIGNATURE----- >>Version: GnuPG v1.4.10 (GNU/Linux) >>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ >> >>iEYEARECAAYFAk7LxU0ACgkQscQJ24LbaUTZjQCeIjoB2yxuYKYtWPAIFmWvmNl3 >>2xgAn3OGkX/W7j7pw0TIfiK2JsWgXzzE >>=t595 >>-----END PGP SIGNATURE----- >>_______________________________________________ >>Python mailing list >>Python@lists.python.it >>http://lists.python.it/mailman/listinfo/python >> > > >_______________________________________________ >Python mailing list >Python@lists.python.it >http://lists.python.it/mailman/listinfo/python > _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python