Added capturing the console output.

This code captures the output generated by 'call' and 'eval' and then prints it on the python side to stdout.  Doesn't quite work nicely together with the notebook viewer.