I'd like to include Python scripting in one of my applications, that is written in Python itself.
My application must be able to call external Python functions (written by the user) as callbacks. There must be some control on code execution; for example, if the user provided code with syntax errors, the application must signal that.
What is the best way to do this?
Thanks.
edit: question was unclear. I need a mechanism similar to events of VBA, where there is a "declarations" section (where you define global variables) and events, with scripted code, that fire at specific points.