cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PyCurl SSL on Win32/HTTPGET boolean values in Python

From: Kjetil Jacobsen <kjetilja_at_cs.uit.no>
Date: 23 Jan 2003 14:33:25 +0100

On Thu, 2003-01-23 at 12:55, Ray S wrote:
> I have tried to apply the same logic in Python but am
> running into trouble because of the absence of Boolean
> values in Python. When I try to do
> Curl.setopt(pycurl.HTTPGET, 1) in Python I get an
> error because the method does not accept integers. I
> have also tried this with 'TRUE' instead of 1 but
> strings are also disallowed.
>
> Can you, Kjetil Jacobsen or anyone else shed any
> further light on this issue?

true, booleans won't work in python or pycurl -- at least not until
python 2.3 is mainstream.

however, the following works ok here:

>>> import pycurl
>>> c = pycurl.Curl()
>>> c.setopt(pycurl.URL, 'http://curl.haxx.se')
>>> c.setopt(pycurl.HTTPGET, 1)
>>> c.perform()

even so after doing a httppost, so i'm not sure what is causing your
script to fail. could you submit some code which reproduces the
problem?

regards,

        - kjetil

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-23