X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=trunk%2Fpycurl%2Ftests%2Ftest_debug.py;fp=trunk%2Fpycurl%2Ftests%2Ftest_debug.py;h=d439b16ee2be0f69cf87f23269ea3d9acac074e8;hb=5a4c1b1278ffa01e630fde47f7c54888ed20a576;hp=0000000000000000000000000000000000000000;hpb=cee5ab52df1c9f38b6eaff2dd354cb22f59028c7;p=plcapi.git diff --git a/trunk/pycurl/tests/test_debug.py b/trunk/pycurl/tests/test_debug.py new file mode 100644 index 0000000..d439b16 --- /dev/null +++ b/trunk/pycurl/tests/test_debug.py @@ -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()