Package soovee_lib :: Module cache
[frames] | no frames]

Module cache

SooVee Serial Audio Manager - Network file access library for SooVee. This allows a file to be read once from the network or then locally aftwerwards. If file is present locally, you must pass 'update=True' to the Cache module.


Requires:
Classes
    Setup Urllib2 cookie object
  CacheException
Generic Cache Exception
    Cache mechanisim
  Cache
Store Internet files locally.
Functions
    Service authorization
boolean
authcookie(uri, query)
Authorize servicr login query with uri.
Variables
  HOMEPATH = '/home/ausimage'
  WORKPATH = '/home/ausimage/.cache/soovee'
  __package__ = 'soovee_lib'
    Urllib2 http header
  CONTENTHEADERS = {'Accept': 'text/html,application/xhtml+xml,a...
    Setup Urllib2 cookie object
  cj = <_LWPCookieJar.LWPCookieJar[]>
  WEB_OBJ = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))

Imports: os, cookielib, urllib2, urlencode, mkpath, mkfile


Function Details

authcookie(uri, query)

 

Authorize servicr login query with uri. The module will then contain an auth cookie to access a user's serial audio feed service.

Parameters:
  • uri (basestring) - Location of service login page.
  • query (dict) - Dictionary of query name / value pairs.
Returns: boolean
Success of operation
Raises:

Variables Details

CONTENTHEADERS

Value:
{'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;\
q=0.8',
 'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
 'User-Agent': 'Mozilla/5.0 (compatible; Linux i686; en; rv:1.9.0.5)'}