[Twisted-Python] RE: How do I upload files using FTPClient?
ldanielburr at earthlink.net
Mon Jan 13 20:14:26 EST 2003
On Wed, Jan 08, 2003 at 23:53:17 +1100 Andrew Bennetts wrote:
>> Yes, that's my fault. I haven't gotten around
>> to that yet -- I might have a stab at it
>> tonight, it shouldn't actually be that hard.
>> I'll try to make sure I get this done in time
>> for the 1.0.2 release.
That would be awesome; I'd be interested in contributing some code/tests/docs
for the revised module.
> Just letting you know I haven't forgotten about
> this, but solving this properly really involves
> refactoring the mess in FTPClient.retrieve...
> and if I do that properly, it'll make my planned
> rewrite of the FTP server alot easier, as it
> ought to be able to re-use the code.
> Unfortunately this means it might take a few
> more days before this happens.
While you are still thinking about the solution, might I suggest something
with regard to FTPClient ?
I've been going over the existing python ftplib.FTP code, as well as
twisted.protocols.ftp.FTPClient, and I'm left wondering one thing: Why don't
either of these classes implement the client commands in the manner that your
typical command-line FTP client does? I think FTPClient should have simple
methods, like "binary", "get", "mget", "mkdir", et cetera. From the
developer's viewpoint, you'd just use FTPClient in the same manner as you
would an interactive ftp client session; the actual queueing of commands,
creation of Deferreds, and callbacks could be hidden away a little more easily
then, and make life easier for developers just looking to roll a simple FTP
client application using Twisted.
Thanks for listening,
L. Daniel Burr
More information about the Twisted-Python