| 1 |
#! /usr/bin/env python |
| 2 |
# vi:ts=4:et |
| 3 |
|
| 4 |
import pycurl |
| 5 |
|
| 6 |
c = pycurl.Curl() |
| 7 |
# Redirects to https://www.python.org/. |
| 8 |
c.setopt(c.URL, 'http://www.python.org/') |
| 9 |
# Follow redirect. |
| 10 |
c.setopt(c.FOLLOWLOCATION, True) |
| 11 |
c.perform() |
| 12 |
c.close() |