[Twisted-Python] How do I upload files using FTPClient?

Daniel Burr ldanielburr at earthlink.net
Mon Jan 6 13:14:18 EST 2003


I am currently designing a code-deploying service, to be used in conjunction
with a variety of source control tools.  I'm looking to use Twisted in the
implementation of the file-transfer mechanism, as Twisted's broad protocol
support would make it easy for me to switch from say, FTP to HTTP, or to some
custom protocol I roll myself.

I've experimented with twisted.protocols.ftp.FTPClient, and the one thing I
can't seem to grok is how to perform file uploads.  I've read through the
code, and it seems that the FTP server class supports RETR and STOR, using
DTPFactory, while FTPClient only supports RETR, and implements it
independently.

Basically, I'm lost as to how to connect FTPClient to DTPFactory, such that I
can send files from FTPClient.  I just need some pointers on how to accomplish
this; it seems like the code is there to do it, but I'm missing the necessary
Twisted mindset in this case.

Thanks for your help.

L. Daniel Burr




More information about the Twisted-Python mailing list