def print_bad():
 print BAD_OUTPUT
 print >>sys.stdout, BAD_OUTPUT
 print >>sys.stderr, BAD_OUTPUT
 sys.stdout.write(BAD_OUTPUT)
 sys.stdout.writelines([BAD_OUTPUT])
 sys.stderr.write(BAD_OUTPUT)
 sys.stderr.writelines([BAD_OUTPUT])

def print_bad ( ) : print BAD_OUTPUT print >> sys . stdout , BAD_OUTPUT print >> sys . stderr , BAD_OUTPUT sys . stdout . write ( BAD_OUTPUT ) sys . stdout . writelines ( [ BAD_OUTPUT ] ) sys . stderr . write ( BAD_OUTPUT ) sys . stderr . writelines ( [ BAD_OUTPUT ] )
if any of this makes it to stdout/stderr .