Python 2.x – Write binary output to stdout?
Is there any way to write binary output to sys.stdout in Python 2.x? In Python 3.x, you can just use sys.stdout.buffer (or detach stdout, etc…), but I haven’t been able to find any solutions for Python 2.5/2.6.