def _engine_namespace_handler(k, v):
 engine = cherrypy.engine
 if (k == 'autoreload_on'):
  if v:
   engine.autoreload.subscribe()
  else:
   engine.autoreload.unsubscribe()
 elif (k == 'autoreload_frequency'):
  engine.autoreload.frequency = v
 elif (k == 'autoreload_match'):
  engine.autoreload.match = v
 elif (k == 'reload_files'):
  engine.autoreload.files = set(v)
 elif (k == 'deadlock_poll_freq'):
  engine.timeout_monitor.frequency = v
 elif (k == 'SIGHUP'):
  engine.listeners['SIGHUP'] = set([v])
 elif (k == 'SIGTERM'):
  engine.listeners['SIGTERM'] = set([v])
 elif ('.' in k):
  (plugin, attrname) = k.split('.', 1)
  plugin = getattr(engine, plugin)
  if (attrname == 'on'):
   if (v and hasattr(getattr(plugin, 'subscribe', None), '__call__')):
    plugin.subscribe()
    return
   elif ((not v) and hasattr(getattr(plugin, 'unsubscribe', None), '__call__')):
    plugin.unsubscribe()
    return
  setattr(plugin, attrname, v)
 else:
  setattr(engine, k, v)

def _engine_namespace_handler ( k , v ) : engine = cherrypy . engine if ( k == 'autoreload_on' ) : if v : engine . autoreload . subscribe ( ) else : engine . autoreload . unsubscribe ( ) elif ( k == 'autoreload_frequency' ) : engine . autoreload . frequency = v elif ( k == 'autoreload_match' ) : engine . autoreload . match = v elif ( k == 'reload_files' ) : engine . autoreload . files = set ( v ) elif ( k == 'deadlock_poll_freq' ) : engine . timeout_monitor . frequency = v elif ( k == 'SIGHUP' ) : engine . listeners [ 'SIGHUP' ] = set ( [ v ] ) elif ( k == 'SIGTERM' ) : engine . listeners [ 'SIGTERM' ] = set ( [ v ] ) elif ( '.' in k ) : ( plugin , attrname ) = k . split ( '.' , 1 ) plugin = getattr ( engine , plugin ) if ( attrname == 'on' ) : if ( v and hasattr ( getattr ( plugin , 'subscribe' , None ) , '__call__' ) ) : plugin . subscribe ( ) return elif ( ( not v ) and hasattr ( getattr ( plugin , 'unsubscribe' , None ) , '__call__' ) ) : plugin . unsubscribe ( ) return setattr ( plugin , attrname , v ) else : setattr ( engine , k , v )
config handler for the "engine" namespace .