curl-and-python

Re: Send FTP commands with pycurl.QUOTE

From: MARTIN Oliver <o.martin_at_wanadoo.fr>
Date: Mon, 14 Jun 2010 13:33:33 +0200

Le 14/06/2010 12:19, MARTIN Oliver a écrit :
>
> Hi, I'm trying to delete a file on a FTP.
>
> After connecting, I use pycurl.QUOTE to delete the file but an error
> is returned.
>
> Here is my code:
>
> c=pycurl.Curl()
> c.setopt(pycurl.URL, 'ftp_adress')
> c.setopt(pycurl.QUOTE, [DELE file_to_delete])
> c.perform()
>
> Here is the error code:
>
> Traceback (most recent call last):
> File "<pyshell#22>", line 1, in <module>
> c.perform()
> error: (21, 'QUOT command failed with 550')
>
> I've already seen this topic
> http://curl.haxx.se/mail/curlpython-2006-08/0002.html
>
> I've tried several things, but I still can delete a file.
>
> Thanks for your Help.
>
> Olivier.
>
>
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
>
>
Hi,

ok, that's working.
The command must be into "", and if there are several commands, they
must be in the same list : The QUOTE option must be called only once

Olivier.

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2010-06-14