On Thu, Aug 25, 2011 at 5:22 PM, Laszlo Nagy <gand...@shopzeus.com> wrote:
> ** > > I tried httplib, httplib2, urllib2 with no avail. > I managed to do this via command line curl: > > $ curl http:/xyz.com/testing/shashwat/test.txt -T test.txt -H > "sw-version: 1.0" -H > "CA-Cert-Auth:v=1;a=yxyz.prod;h=10.10.0.1;t=1316594650;s=.AeEYJMMfElN74fnWD3GlXJ4J.1KiQFg--" > --proxy proxy.xyz.com:3128 -H "Content-Type:text/plain" > > If you can do it with command line curl then probably you can do it with > pycurl. > > http://pycurl.sourceforge.net/ > Yeah. I tried that. The system is RHEL 4. So it gave me this error : src/pycurl.c:42:20: Python.h: No such file or directory src/pycurl.c:43:22: pythread.h: No such file or directory src/pycurl.c:58:4: #error "Need Python version 2.2 or greater to compile pycurl." src/pycurl.c:61:4: #error "Need libcurl version 7.19.0 or greater to compile pycurl." Apparently we need python-devel package. Following http://fedoraproject.org/wiki/EPEL/FAQ#howtouse I added EPEL software repository. sh-3.00$ yum list | grep -i python-dev sh-3.00$ sudo yum -y install python-dev Password: Setting up Install Process Setting up repositories epel [1/1] epel 100% |=========================| 3.8 kB 00:00 Reading repository metadata in from local files b1f7bfef07466e9561644aba7 100% |=========================| 841 kB 00:06 epel : ################################################## 2583/2583 Added 2583 new packages, deleted 0 old in 4.51 seconds Parsing package install arguments No Match for argument: python-dev Nothing to do Turned out that python-curl is the required package which is already installed. Still no use. sh-3.00$ yum list | grep -i python-curl python-curl.x86_64 7.12.1-1.3.el4.rf installed sh-3.00$ python Python 2.6.4 (r264:75706, Nov 9 2009, 16:32:06) [GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pycurl Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pycurl >>> Tried installing via easy_install sh-3.00$ sudo easy_install pycurl Searching for pycurl Reading http://pypi.python.org/simple/pycurl/ Reading http://pycurl.sourceforge.net/ Reading http://pycurl.sourceforge.net/download/ Best match: pycurl 7.19.0 Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz Processing pycurl-7.19.0.tar.gz Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2ZCa8v/pycurl-7.19.0/egg-dist-tmp-DyHFls Using curl-config (libcurl 7.12.1) src/pycurl.c:42:20: Python.h: No such file or directory src/pycurl.c:43:22: pythread.h: No such file or directory src/pycurl.c:58:4: #error "Need Python version 2.2 or greater to compile pycurl." src/pycurl.c:61:4: #error "Need libcurl version 7.19.0 or greater to compile pycurl." [... Error Clipped] error: Setup script exited with error: command '/usr/bin/gcc' failed with exit status 1 > > Best, > > Laszlo > >
-- http://mail.python.org/mailman/listinfo/python-list