[Twisted-Python] using ftpclient storeFile question

Jean-Paul Calderone exarkun at divmod.com
Wed Jul 19 09:08:32 EDT 2006


On Wed, 19 Jul 2006 12:50:05 +0000 (GMT), Stéphane Brault <stephane_brault at yahoo.fr> wrote:
>Hi,
> I'm using twisted to create a ftp client. The only problem I have is I don't understand how to upload a file (using storeFile), since the only parameters this function has is the path where to store the file. How do I indicate which file to upload ?

storeFile returns a two-tuple of Deferreds.  The first Deferred fires with an
L{IFinishableConsumer}.  You put the data to uploda into that consumer.  You
do this using a producer, eg twisted.protocols.basic.FileSender.

Jean-Paul




More information about the Twisted-Python mailing list