I'm trying to get into the details about how Python 3 APIs are designed, when adding elements to an UI using APIs from modules available inside applications that offer a python 3.x interpreter I'm asked to register a callback in order to be able to use my functions/scripts: what does "registering a callback" means from the Cpython's point of view ?
typically, it means that you create a function:
def foo(some,arguments):
pass #do something here
and then you pass that function to some class in the provided API:
API_class_instance.register_callback(foo)
Now the API_class_instance
will call foo
under the documented circumstances.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With