How to execute python code after each stroke in image editor?

Is there any possibility for this?