I've changed the python session evaluation so that it explicitly sends a RET to the inferior Python process after every line of input. The attached patch makes this change. I can confirm that this fixes the problem in your example (when an empty line is placed between the block and the subsequent print statement), however, could you please test it on a variety of other python blocks to confirm it doesn't seem to break existing behavior (I'm not a python user). If this looks safe then I'll apply it to the main repo. Thanks! -- Eric