Python kivy 模块,factory() 实例源码

我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用kivy.factory()

项目:device-updater    作者:spark    | 项目源码 | 文件源码
def kivy_event_thread_dispatch(proxy, target, name, f):
    """
    a function factory that returns a function that will schedule
    the given function for execution on the event thread.
    """
    def schedule(self, *args, **kwargs):
        def scheduled(dt):
            f(*args, **kwargs)
        Clock.schedule_once(scheduled)
    return schedule