Comment imprimer sur stderr en Python?

Il y a plusieurs façons d'écrire sur stderr: # Note: this first one does not work in Python 3 print >> sys.stderr, "spam" sys.stderr.write("spam\n") os.write(2, b"spam\n") from __future__ import print_function print("spam", file=sys.stderr) Cela semble contredire le zen de Python # 13 † ,...