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
Post a Comment