You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there!
I was wondering about callbacks in a script context.
If I have a script and like to register a callback for an event.
I would build it like this:
test.py:
The module would look something like this:
Then I would call my test.py with the interpreter like this:
This will fail because
y = 5
is not defined. I found no way to give the function globals and locals as parameter.Is there some trick for that or should I change the way I use callbacks?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions