Newbie question: Python 2.6, Ubuntu 10.04, I can import both pycurl
and curl
, the former having different names for functions (set_option
vs. setopt
).
What's the difference between the two modules?
curl
is a module which uses pycurl
. It provides the curl.Curl
class which provides a high-level interface to the pycurl functions.
I haven't found much documentation on how to use it, but reading /usr/share/pyshared/curl/__init__.py
may make it pretty self-obvious.
There are also some examples in /usr/share/doc/python-pycurl/examples
which use curl.Curl
.
As @unutbu mentioned pycurl uses the curl library. CUrl is written in C and pycurl is a wrapped around this so you can easily call the library using python code.
Similarly, there are implementation of curl wrappers in pretty much all other mainstream programming languages all which use the core libCUrl library at the center.
A list of possible bindings can be found on the libcurl website: http://curl.haxx.se/libcurl/