piping out binaries properly

Erik Max Francis max at alcyone.com
Wed Oct 12 01:50:55 EDT 2005


Mike Meyer wrote:

> I watched the Unix world grow up, and it ain't normal to me.

Since there's no distinction between a file opened in binary mode and in 
text mode on Unix, there is no difference.

> I don't
> think I've ever written a program that wrote binary data to standard
> out, not in nearly 30 years of unix programming. I've written lots of
> things whose standard out was designed specifically to be read by
> another program, but never as binary data.

Plenty of applications use that functionality and depend on it.  See 
cjpeg, djpeg, the pbmplus library, and so forth.

-- 
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
   Every human being is a problem in search of a solution.
   -- Ashley Montagu



More information about the Python-list mailing list