libqtile/scripts/qtile_cmd.py
def run_function(obj, funcname, args):
    "Run command with specified args on given object."
    try:
        func = getattr(obj, funcname)
    except AttributeError:
        print("error: Sorry no function ", funcname)
        exit()

    try:
        ret = func(*args)
    except CommandError:
        print("error: Sorry command '{}' cannot be found".format(funcname))
        exit()
    except CommandException:
        print("error: Sorry cannot run function '{}' with arguments {}"
              .format(funcname, args))
        exit()

    return ret
Run command with specified args on given object.
Run command with specified args on given object.
Run command with specified args on given object .
def run_function(obj, funcname, args):
    try:
        func = getattr(obj, funcname)
    except AttributeError:
        print("error: Sorry no function ", funcname)
        exit()
    try:
        ret = func(*args)
    except CommandError:
        print("error: Sorry command '{}' cannot be found".format(funcname))
        exit()
    except CommandException:
        print("error: Sorry cannot run function '{}' with arguments {}"
              .format(funcname, args))
        exit()
    return ret
def run_function ( obj , funcname , args ) : try : func = getattr ( obj , funcname ) except AttributeError : print ( "error: Sorry no function " , funcname ) exit ( ) try : ret = func ( * args ) except CommandError : print ( "error: Sorry command '{}' cannot be found" . format ( funcname ) ) exit ( ) except CommandException : print ( "error: Sorry cannot run function '{}' with arguments {}" . format ( funcname , args ) ) exit ( ) return ret
Run command with specified args on given object.
Run command with specified args on given object .
"Run command with specified args on given object."
obj
funcname
args