> http://lmgtfy.com/?q=python+lib+http&l=1 >
ha ha.
Bon, je cherche avec urrlib, mais avec python 2.4:
>>> obj = urllib.urlopen("http://domaine.tld")
>>> obj.getcode()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: addinfourl instance has no attribute 'getcode'
>>>
--
Kevin
Thomas NOEL
unread,
Feb 24, 2012, 4:24:42 AM2/24/12
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Le 24-02-2012, Kevin Denis <ke...@nowhere.invalid> a écrit :
>>> sous python 2.4.2
>
Avec httplib, ça fonctionne. En 2.4.2 il n'y a pas de notion de
timeout, dommage:
>>> c = httplib.HTTPConnection("10.0.0.47")
>>> c.request("HEAD", "/")
>>> r = c.getresponse()
>>> print r.status
200
--
Kevin