Basically, you have two problems: how to determine the injection point in the generated code and how to run python / ruby / whatev scripts.
Depending on how you create the process, one possible solution would be to add a function to each possible injection point. The function will check whether the user has associated any scripts with the given points, and if so, runs the script by calling IronPython / IronRuby (with optional specified parameters).
Disadvantages include: limited availability from scripts to the created process (basically, only variables passed as parameters are available); as well as implementation limits (the current version of IronPython skips several basic system functions).
Silver dragon
source share