[Twisted-Python] understand the ftp response

Michele Petrazzo michele.petrazzo at unipex.it
Fri Dec 22 05:23:33 EST 2006

Hi list,
I'm using ftp client and its storeFile for send a file to the server,
but I'm have some troubles to understand its response.

I receive, after the end of connection (fired by the SenderProtocol),
something that ( pprint.pprint(result) ):

     ['150 FILE: /tmp/doc100.tif (Opening new data connection).',
      '226 Transfer complete (FILE: /tmp/doc100.tif).'])]),
  (True, None),
  (True, 'connection done')]

That isn't so readable, for me. I need only the last response (the 150
and 226), so I have to make a: result[0][1][0][1], that work, but is not
so understandable. Is there other soltions?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3273 bytes
Desc: S/MIME Cryptographic Signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20061222/a13dbdb6/attachment.bin 

More information about the Twisted-Python mailing list