Module CookieSmall :: Class BaseCookie
[show private | hide private]
[frames | no frames]

Class BaseCookie

UserDict --+
           |
          BaseCookie

Known Subclasses:
SimpleCookie

Method Summary
  __init__(self, input)
  __repr__(self)
  __setitem__(self, key, value)
Dictionary style assignment.
  __str__(self, attrs, header, sep)
Return a string suitable for HTTP.
  js_output(self, attrs)
Return a string suitable for JavaScript.
  load(self, rawdata)
Load cookies from a string (presumably HTTP_COOKIE) or from a dictionary.
  output(self, attrs, header, sep)
Return a string suitable for HTTP.
  value_decode(self, val)
real_value, coded_value = value_decode(STRING) Called prior to setting a cookie's value from the network representation.
  value_encode(self, val)
real_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation.
    Inherited from UserDict
  __cmp__(self, dict)
  __contains__(self, key)
  __delitem__(self, key)
  __getitem__(self, key)
  __len__(self)
  clear(self)
  copy(self)
  fromkeys(cls, iterable, value)
(Class method)
  get(self, key, failobj)
  has_key(self, key)
  items(self)
  iteritems(self)
  iterkeys(self)
  itervalues(self)
  keys(self)
  pop(self, key, *args)
  popitem(self)
  setdefault(self, key, failobj)
  update(self, dict)
  values(self)

Instance Method Details

__setitem__(self, key, value)
(Index assignment operator)

Dictionary style assignment.
Overrides:
UserDict.UserDict.__setitem__

__str__(self, attrs=None, header='Set-Cookie:', sep='\n')
(Informal representation operator)

Return a string suitable for HTTP.

js_output(self, attrs=None)

Return a string suitable for JavaScript.

load(self, rawdata)

Load cookies from a string (presumably HTTP_COOKIE) or from a dictionary. Loading cookies from a dictionary 'd' is equivalent to calling:
   map(Cookie.__setitem__, d.keys(), d.values())

output(self, attrs=None, header='Set-Cookie:', sep='\n')

Return a string suitable for HTTP.

value_decode(self, val)

real_value, coded_value = value_decode(STRING) Called prior to setting a cookie's value from the network representation. The VALUE is the value read from HTTP header. Override this function to modify the behavior of cookies.

value_encode(self, val)

real_value, coded_value = value_encode(VALUE) Called prior to setting a cookie's value from the dictionary representation. The VALUE is the value being assigned. Override this function to modify the behavior of cookies.

Generated by Epydoc 2.0 on Sat Feb 7 20:08:05 2004 http://epydoc.sf.net