title: Alternative to PycURL?
body: <p>Here's a bit of code that is uploading a file:</p>
  
  <pre><code>  file_size = os.path.getsize('Tea.rdf')
    f = file('Tea.rdf')
    c = pycurl.Curl()
    c.setopt(pycurl.URL, 'http://localhost:8080/openrdf-sesame/repositories/rep/statements')
    c.setopt(pycurl.HTTPHEADER, ["Content-Type: application/rdf+xml;charset=UTF-8"])
    c.setopt(pycurl.PUT, 1)
    c.setopt(pycurl.INFILE, f)
    c.setopt(pycurl.INFILESIZE, file_size)
    c.perform()
    c.close()
  </code></pre>
  
  <p>Now, I'm not liking this PycURL experience at all. Can you suggest any alternative? Maybe urllib2 or httplib can do the same? Can you write some code showing it?</p>
  
  <p>Huge thanks!</p>