mirror of
https://github.com/okalachev/flix.git
synced 2026-01-11 21:46:55 +00:00
pyflix: add passing event name to off method
This commit is contained in:
@@ -59,6 +59,13 @@ flix.on('disconnected', lambda: print('Disconnected from Flix'))
|
||||
flix.on('print', lambda text: print(f'Flix says: {text}'))
|
||||
```
|
||||
|
||||
Unsubscribe from events using `off` method:
|
||||
|
||||
```python
|
||||
flix.off('print') # unsubscribe from print events
|
||||
flix.off(callback) # unsubscribe specific callback
|
||||
```
|
||||
|
||||
You can also wait for specific events using `wait` method. This method returns the data associated with the event:
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user