FTP, Proxy and urllib2
fishboy
fishboy at spamspamspam.com
Tue Jun 8 05:11:37 EDT 2004
On Tue, 08 Jun 2004 09:05:38 +0200, Martin Brodbeck <dg2smb at gmx.de>
wrote:
>John J. Lee wrote:
>
>Hi John,
>
>> I think you need to use ftplib. urllib2 is for fetching files, not
>> uploading them (unless there's some obscure feature of ftp URLs that
>> allows it).
>>
>> Use ftplib.
>
>Ok, but what if there is a proxy between the client and the ftp server?
>Can ftplib handle this? How?
>
>Thanks
>Martin
ftplib wont work with a proxy.
I'm assuming you mean a HTTP proxy for FTP like Squid. In which case,
you might get it work using an HTTP PUT command through urllib2.py.
PUT isn't part of urllib :|
But searching for 'urllib python http put'I found this
http://infomesh.net/2001/QuickPut/QuickPut.txt
Which uses urllib/urllib2. And urllib will work through a proxy.
So it's not inconceivable that you could get something to work.
Personally, I'd just ssh tunnel to a machine outside and forward a
port from there. But I have an ssh fixation.
><{{{*>
More information about the Python-list
mailing list