我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用kivy.factory()。
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