예제 #1
0
def execute(env, user, line, allowdefault=True):
    for component in user.CLIENT_COMPONENTS:
        action = component.parser(syntax.expand(env, user, line))
        if action:
            component.run(env, user, action)
            break
    else:
        if allowdefault:
            execute(env, user, user.DEFAULT_ACTION(line), False)
        else:
            print "Error: Cannot recurse default actions"
예제 #2
0
파일: cui.py 프로젝트: fumieval/Curtana
def execute(env, user, line, allowdefault=True):
    for component in user.CLIENT_COMPONENTS:
        action = component.parser(syntax.expand(env, user, line))
        if action:
            component.run(env, user, action)
            break
    else:
        if allowdefault:
            execute(env, user, user.DEFAULT_ACTION(line), False)
        else:
            print "Error: Cannot recurse default actions"
예제 #3
0
 def command(self, env, user, text):
     for component in user.CLIENT_COMPONENTS:
         action = component.parser(syntax.expand(env, user, text))
         if action:
             component.run(env, user, action)
예제 #4
0
 def command(self, env, user, text):
     for component in user.CLIENT_COMPONENTS:
         action = component.parser(syntax.expand(env, user, text))
         if action:
             component.run(env, user, action)