Execute Python code pieces inside buffers