def run(service): try: chdir(get_path("%s.py" % service, "services")) except Exception: raise RuntimeError(_SERVICE_PY) else: exe(_SERVICE_EX % (service, get_loc()))
def run(service): chdir(get_path("%s.py" % service, "services")) exe("nameko run %s --config %s" % ( service, get_loc()) )
def run(service): exe(_SERVICE_EX % (service, get_loc()), get_path("%s.py" % service, "services"))
def change_lang(lang='zh'): loc = 'i18n' i18n_loc = get_loc(loc, False) if i18n_loc: loc = path.join(i18n_loc, loc) switch_lang(lang, loc)