print() function with encoding= and errors= parameters?

Malcolm Greene python at bdurham.com
Wed Aug 3 08:29:31 EDT 2016


Looking for a way to use the Python 3 print() function with encoding and
errors parameters.

Are there any concerns with closing and re-opening sys.stdout so
sys.stdout has a specific encoding and errors behavior? Would this break
other standard libraries that depend on sys.stdout being configured a
specific way?

Thank you,
Malcolm



More information about the Python-list mailing list