Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The following example from https://foxdot.org/documentation/using-the-tempoclock/
- def update(key, bpm=None):
- Root.default = int(key)
- if bpm is not None:
- Clock.bpm = bpm
- return
- # Schedule for 2 beats in the future
- Clock.schedule(update, Clock.now() + 2, args=[4], kwargs={"bpm", 120})
- produces the following output.
- Welcome to FoxDot! Press Ctrl+H for help.
- -----------------------------------------
- >>> def update(key, bpm=None):
- ... Root.default = int(key)
- ... if bpm is not None:
- ... Clock.bpm = bpm
- ... return
- >>> # Schedule for 2 beats in the future
- ... Clock.schedule(update, Clock.now() + 2, args=[4], kwargs={"bpm", 120})
- Traceback (most recent call last):
- File "C:\Users\andre\AppData\Local\Programs\Python\Python36\lib\site-packages\FoxDot\lib\Code\main_lib.py", line 155, in __call__
- exec(self._compile(code), self.namespace)
- File "FoxDot", line 3, in <module>
- import os.path
- File "C:\Users\andre\AppData\Local\Programs\Python\Python36\lib\site-packages\FoxDot\lib\TempoClock.py", line 662, in schedule
- self.queue.add(obj, beat, args, kwargs, is_priority)
- File "C:\Users\andre\AppData\Local\Programs\Python\Python36\lib\site-packages\FoxDot\lib\TempoClock.py", line 765, in add
- for key in list(kwargs.keys()):
- AttributeError: 'set' object has no attribute 'keys'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement