code: def addHandler(name, basepath=None, baseurl=None, allowDownscale=False):
      
      if basepath is None:
          basepath = '.'
      _handlers.append(_handler_classes[name](basepath, baseurl, allowDownscale))
docs: Add an event handler with given name.