def setUrl(self, url): self.b = StringIO.StringIO() self.c.setopt(pycurl.WRITEFUNCTION, self.b.write) self.c.setopt(pycurl.URL, url)