python - What does h = httplib2.Http('.cache') mean? -



python - What does h = httplib2.Http('.cache') mean? -

what line 2 (h = httplib2.http('.cache')) mean here?

>>> import httplib2 >>> h = httplib2.http('.cache')

from httplib2.http() documentation string:

if 'cache' string used directory name disk cache. otherwise must object supports same interface filecache.

the line creates instance of http() class, , sets cache parameter .cache, meaning .cache directory in current working directory used cached data.

from usage section of project documentation can see cache used cache responses according http caching rules; cache honour cache headers set on response unless override headers corresponding request headers.

python httplib2

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -