On Fri, 18 Sep 2009, Gary V. Vaughan wrote:
I'm writing a multi-protocol file download application using pycurl 7.19 built with libcurl from the curl-7.19.6 release. I want to use my own progress bar, so I need to know the file size in advance of launching the download proper...
The progress callback informs about the file size, if known. You don't need to do any particular file size check of your own for that to happen.
The above works only if I use a key with no-passphrase. Is it possible to use a key that takes a passphrase?
I believe so, yes.
pycurl.URL: 'sftp://example.com/~/a_26MB_binary_file', pycurl.USERPWD: 'gary:key pass-phrase'
USERPWD is for the remote auth, not for the key auth. CURLOPT_KEYPASSWD is what you want I believe.
is it possible to get just the filesize over SFTP using pycurl?
No, unfortunately at least not in that conveniant CURLOPT_NOBODY way most other protocols support.
It'd be a great addition though. -- / daniel.haxx.se
