def xontrib_context(name):
 spec = find_xontrib(name)
 if (spec is None):
  return None
 m = importlib.import_module(spec.name)
 pubnames = getattr(m, '__all__', None)
 if (pubnames is not None):
  ctx = {k: getattr(m, k) for k in pubnames}
 else:
  ctx = {k: getattr(m, k) for k in dir(m) if (not k.startswith('_'))}
 return ctx

def xontrib_context ( name ) : spec = find_xontrib ( name ) if ( spec is None ) : return None m = importlib . import_module ( spec . name ) pubnames = getattr ( m , '__all__' , None ) if ( pubnames is not None ) : ctx = { k : getattr ( m , k ) for k in pubnames } else : ctx = { k : getattr ( m , k ) for k in dir ( m ) if ( not k . startswith ( '_' ) ) } return ctx
return a context dictionary for a xontrib of a given name .