Merge from trunk
[plcapi.git] / trunk / pycurl / tests / test_debug.py
diff --git a/trunk/pycurl/tests/test_debug.py b/trunk/pycurl/tests/test_debug.py
new file mode 100644 (file)
index 0000000..d439b16
--- /dev/null
@@ -0,0 +1,16 @@
+#! /usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# vi:ts=4:et
+# $Id$
+
+import pycurl
+
+def test(t, b):
+    print "debug(%d): %s" % (t, b)
+
+c = pycurl.Curl()
+c.setopt(pycurl.URL, 'http://curl.haxx.se/')
+c.setopt(pycurl.VERBOSE, 1)
+c.setopt(pycurl.DEBUGFUNCTION, test)
+c.perform()
+c.close()