def decoratedFunc(*args, **kwargs): cmds.waitCursor(st=True) try: return func(*args, **kwargs) finally: cmds.waitCursor(st=False)