<br><br><div class="gmail_quote">On Thu, Aug 25, 2011 at 5:22 PM, Laszlo Nagy <span dir="ltr"><<a href="mailto:gandalf@shopzeus.com">gandalf@shopzeus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<u></u>

  
    
  
  <div bgcolor="#ffffff" text="#000000"><div class="im">
    <br>
    <blockquote type="cite">
      <div>I tried httplib, httplib2, urllib2 with no avail.</div>
      <div>I managed to do this via command line curl:</div>
      <div><br>
      </div>
      <div>$ curl <a href="http:/" target="_blank">http:/</a><a href="http://xyz.com/testing/shashwat/test.txt" target="_blank">xyz.com/testing/shashwat/test.txt</a>
        -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 <a href="http://proxy.xyz.com:3128" target="_blank">proxy.xyz.com:3128</a> -H
        "Content-Type:text/plain"</div>
    </blockquote></div>
    If you can do it with command line curl then probably you can do it
    with pycurl.<br>
    <br>
    <a href="http://pycurl.sourceforge.net/" target="_blank">http://pycurl.sourceforge.net/</a></div></blockquote><div><br></div><div>Yeah.</div><div>I tried that.</div><div>The system is RHEL 4.</div><div><br></div><div>

So it gave me this error :</div><div>src/pycurl.c:42:20: Python.h: No such file or directory</div><div>src/pycurl.c:43:22: pythread.h: No such file or directory</div><div>src/pycurl.c:58:4: #error "Need Python version 2.2 or greater to compile pycurl."</div>

<div>src/pycurl.c:61:4: #error "Need libcurl version 7.19.0 or greater to compile pycurl."</div><div><br></div><div>Apparently we need python-devel package.</div><div>Following <a href="http://fedoraproject.org/wiki/EPEL/FAQ#howtouse">http://fedoraproject.org/wiki/EPEL/FAQ#howtouse</a> I added EPEL software repository.</div>

<div><br></div><div>sh-3.00$ yum list | grep -i python-dev</div><div>sh-3.00$ sudo yum -y install python-dev</div><div>Password:</div><div>Setting up Install Process</div><div>Setting up repositories</div><div>epel                                                                 [1/1]</div>

<div>epel                      100% |=========================| 3.8 kB    00:00     </div><div>Reading repository metadata in from local files</div><div>b1f7bfef07466e9561644aba7 100% |=========================| 841 kB    00:06     </div>

<div>epel      : ################################################## 2583/2583</div><div>Added 2583 new packages, deleted 0 old in 4.51 seconds</div><div>Parsing package install arguments</div><div>No Match for argument: python-dev</div>

<div>Nothing to do </div><div><br></div><div>Turned out that python-curl is the required package which is already installed.</div><div>Still no use.</div><div><br></div><div><div>sh-3.00$ yum list | grep -i python-curl</div>

<div>python-curl.x86_64                       7.12.1-1.3.el4.rf      installed       </div><div>sh-3.00$ python</div><div>Python 2.6.4 (r264:75706, Nov  9 2009, 16:32:06) </div><div>[GCC 3.4.6 20060404 (Red Hat 3.4.6-10)] on linux2</div>

<div>Type "help", "copyright", "credits" or "license" for more information.</div><div>>>> import pycurl</div><div>Traceback (most recent call last):</div><div>  File "<stdin>", line 1, in <module></div>

<div>ImportError: No module named pycurl</div><div>>>> </div></div><div><br></div><div>Tried installing via easy_install</div><div><br></div><div><div><div>sh-3.00$ sudo easy_install pycurl</div><div><br></div><div>

Searching for pycurl</div><div>Reading <a href="http://pypi.python.org/simple/pycurl/">http://pypi.python.org/simple/pycurl/</a></div><div>Reading <a href="http://pycurl.sourceforge.net/">http://pycurl.sourceforge.net/</a></div>

<div>Reading <a href="http://pycurl.sourceforge.net/download/">http://pycurl.sourceforge.net/download/</a></div><div>Best match: pycurl 7.19.0</div><div>Downloading <a href="http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz">http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz</a></div>

<div>Processing pycurl-7.19.0.tar.gz</div><div>Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-2ZCa8v/pycurl-7.19.0/egg-dist-tmp-DyHFls</div><div>Using curl-config (libcurl 7.12.1)</div></div></div>

<div><div>src/pycurl.c:42:20: Python.h: No such file or directory</div><div>src/pycurl.c:43:22: pythread.h: No such file or directory</div><div>src/pycurl.c:58:4: #error "Need Python version 2.2 or greater to compile pycurl."</div>

<div>src/pycurl.c:61:4: #error "Need libcurl version 7.19.0 or greater to compile pycurl."</div></div><div>[... Error Clipped]</div><div>error: Setup script exited with error: command '/usr/bin/gcc' failed with exit status 1</div>

<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000"><br>
    <br>
    Best,<br><font color="#888888">
    <br>
       Laszlo<br>
    <br>
  </font></div>

</blockquote></div><br>