def guess_sys_stdout_encoding():
 return (getattr(sys.stdout, 'encoding', None) or getattr(__stdout__, 'encoding', None) or locale.getpreferredencoding() or sys.getdefaultencoding() or 'ascii')

def guess_sys_stdout_encoding ( ) : return ( getattr ( sys . stdout , 'encoding' , None ) or getattr ( __stdout__ , 'encoding' , None ) or locale . getpreferredencoding ( ) or sys . getdefaultencoding ( ) or 'ascii' )
return the best guessed encoding to be used for printing on sys .