[Twisted-Python] Ftp client
Andrew Bennetts
andrew-twisted at puzzling.org
Wed Aug 3 06:25:52 MDT 2005
On Wed, Aug 03, 2005 at 12:22:59PM +0200, Michele Petrazzo wrote:
> I want to port my ftp client class from standard library (ftplib) to
> twisted ftpclient. I start to work with ftpclient example and with a
> "standard" ftp server, it work well, of course :), but I'm working on a
> not standard server (hylafax), that not accept the standard commands, so
> now with the standard library, every time that I want to communicate
> with it, I send its internal commands.
>
> Is it possible to "translate" my very short and simple code to twisted
> ftpclint?
Probably. If you need to send non-standard commands, you can do that with
ftpclient.queueStringCommand("BLAH blah blah").
> However, I have already tried to modify the simple generic client
> example "EchoClient", and it work until I make a "LIST status" request,
> that it would have to return a short string (100-150 characters),
> because if I use passive mode (command 'PASV') I receive a 425 error,
> and if I don't use it, I don't receive anything (I wait...).
>
> Can someone point me to the right direction ?
The right way is to re-use the existing FTPClient logic as much as possible,
rather than reimplementing it.
What specific problems are you having with twisted.protocols.ftp.FTPClient?
-Andrew.
More information about the Twisted-Python
mailing list