BUG: Fixed issue of writing Python errors to stdout instead of stderr
Merge pull request #523 from lassoan/python-log-error-to-stderr

BUG: Fixed issue of writing Python errors to stdout instead of stderr