
Sometimes these are different file descriptors, not to mention the Unix port, so use stderr to distinguish these error messages. CPython prints to stdout, but it does it via a call to the logging module. We don't want to introduce a dependency on logging, so printing to stderr is a good alternative. One can override default_exception_handler() if needed.