Package pywikipedia :: Module wikipedia :: Class Throttle
[show private | hide private]
[frames | no frames]

Type Throttle

object --+
         |
        Throttle


Method Summary
  __init__(self, mindelay, maxdelay, multiplydelay)
Make sure there are at least 'delay' seconds between page-gets after 'ignore' initial page-gets
  __call__(self, requestsize)
This is called from getEditPage without arguments.
  checkMultiplicity(self)
  drop(self)
Remove me from the list of running bots processes.
  getDelay(self)
  setDelay(self, delay, absolute)
  waittime(self)
Calculate the time in seconds we will have to wait if a query would be made right now
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

__init__(self, mindelay=2, maxdelay=60, multiplydelay=True)
(Constructor)

Make sure there are at least 'delay' seconds between page-gets after 'ignore' initial page-gets
Overrides:
__builtin__.object.__init__

__call__(self, requestsize=1)
(Call operator)

This is called from getEditPage without arguments. It will make sure that if there are no 'ignores' left, there are at least delay seconds since the last time it was called before it returns.

drop(self)

Remove me from the list of running bots processes.

waittime(self)

Calculate the time in seconds we will have to wait if a query would be made right now

Generated by Epydoc 2.1 on Sun Jul 03 17:07:32 2005 http://epydoc.sf.net