2 # -*- coding: iso-8859-1 -*-
9 ## Callback function invoked when body data is ready
11 # Print body data to stdout
14 ## Callback function invoked when header data is ready
16 # Print header data to stderr
20 c.setopt(pycurl.URL, 'http://www.python.org/')
21 c.setopt(pycurl.WRITEFUNCTION, body)
22 c.setopt(pycurl.HEADERFUNCTION, header)
23 c.setopt(pycurl.FOLLOWLOCATION, 1)
24 c.setopt(pycurl.MAXREDIRS, 5)
26 c.setopt(pycurl.URL, 'http://curl.haxx.se/')