def cmd_action(parent, cmd, fn, *hotkeys):
 return qtutils.add_action(parent, cmd.name(), (lambda : cmds.do(cmd, fn())), *hotkeys)

def cmd_action ( parent , cmd , fn , * hotkeys ) : return qtutils . add_action ( parent , cmd . name ( ) , ( lambda : cmds . do ( cmd , fn ( ) ) ) , * hotkeys )
wrap a standard command object in a qaction this function assumes that :func:fn() takes no arguments .