Exemplo n.º 1
0
Arquivo: cli.py Projeto: kebot/yafa
def _import_current_module():
    try:
        appname = storage.__getitem__('current_app')
        return __import__(appname)
    except ImportError, e:
        print 'No yafa app called %s' % appname
        raise e
Exemplo n.º 2
0
Arquivo: cli.py Projeto: kebot/yafa
def cmd_list():
    print 'List of available apps:'
    for i, app in enumerate(get_subapps()):
        is_current = storage.__getitem__('current_app') == app
        print render_template("""{{i}}. {{app}}{% if is_current %}(*){% endif %}""",
                is_current=is_current, app=app, i=i)