This morning I want to share this is awesome post: MindshaRE. Debugging code by injecting Python is a great and cheap idea . dvlabs in its post walks through an alternate way (python code injection) to perform the debugging process that can be abstracted to solve a bunch of different problems. Additionally, it offers didactic example code.
They use ctypes library which allows to load DLLs, to call DLL functions and to create/read/execute pieces of memory.... Have a good reading !