def get_encoded_writer (out=sys.stdout, encoding=None, errors='replace'):
    """Get wrapped output writer with given encoding and error handling."""
    if encoding is None:
        encoding = default_encoding
    Writer = codecs.getwriter(encoding)
    return Writer(out, errors)
def get_encoded_writer ( out = sys . stdout , encoding = None , errors = 'replace' ) : if encoding is None : encoding = default_encoding Writer = codecs . getwriter ( encoding ) return Writer ( out , errors )
Get wrapped output writer with given encoding and error handling.