Re: How to do a Http HEAD requests

2006-12-12 Thread Fredrik Lundh
Soni Bergraj wrote: > I was just wondering if there is a more convenient way of doing a Http > HEAD requests then the socket module? quick version: >>> import urllib2 >>> request = urllib2.Request("http://www.python.org";) >>> request.get_method = lambda: "HEAD" >>> http_file = urllib2.urlopen(r

Re: How to do a Http HEAD requests

2006-12-12 Thread Gerard Flanagan
Soni Bergraj wrote: > Hello list, > I was just wondering if there is a more convenient way of doing a Http > HEAD requests then the socket module? > > Any ideas? I recently used this: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286225 Gerard -- http://mail.python.org/mailman/list

Re: How to do a Http HEAD requests

2006-12-11 Thread Tim Roberts
Soni Bergraj <[EMAIL PROTECTED]> wrote: > >I was just wondering if there is a more convenient way of doing a Http >HEAD requests then the socket module? > >Any ideas? The standard "httplib" module can do that in a half-dozen lines of code. -- Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheid