Is there a decoupled method of passing in a binary file without suffering the penalty of python having unbuffered stdout for the entire duration of running a program (if i intend to use only cmdline and not open(…,’rb’)? It seems like -u is the only way to read in a file as binary data (from cmdline)
http://docs.python.org/using/cmdline.html
-u Force stdin, stdout and stderr to be totally unbuffered. On systems where it matters, also put stdin, stdout and stderr in binary mode.
You could perhaps avoid Python’s file mode by instead grabbing the fileno out of the
sys.stdinfile-like object, and usingos.read()to grab data from it?