I'm porting some scripts from CPython to Jython and I am running into some I/O issue that perhaps someone could clarify whether this is a bug or a feature of jython v2.2.1. Basically, I am loading some floats from a binary stream into an array. Something like,

import array
a = array.array('f')

where Reader is actually the stdout of a C program captured with popen2():

Reader, Writer = popen2(cmdline,bufsize=0)

On CPython 2.5 I get the values as expected. Under jython, the numbers are byte swapped, that is, a.byteswap() produce the correct values. It appears that somewhere along jython is assuming that the Reader stream is in network byte order and doing the swap for me.  Not surprisingly, I have no problem getting strings from Reader.

Is there a way for me to disable this automatic byte swap when reading floats?

   Thank you,

Arlindo da Silva