Scott David Daniels wrote:
> biner wrote:
> > I am using a program that has to read binary data from files
coming
> > from different machines. The file are always written with big
endian.
>
> Diez B. Roggisch wrote:
> [Scott David Daniels wrote]
> >>How about sys.byteorder?
> > This doesn't h
> But, in fact, he says the files are always big endian. So, code like
> the following should address his problem. Note I use type 'h' as an
> example so I can easily read samples.
I'm sorry, I confused that he asked for machine endianess. Then of course
you are right.
--
Regards,
Diez B. Rog
biner wrote:
> I am using a program that has to read binary data from files coming
> from different machines. The file are always written with big endian.
Diez B. Roggisch wrote:
[Scott David Daniels wrote]
How about sys.byteorder?
This doesn't help, as he wants to read files from varying endian
On Fri, 03 Dec 2004 19:19:48 +0100, "Diez B. Roggisch" <[EMAIL PROTECTED]>
wrote:
>> I would like to have a test to tell me if the current machine is
^^^
> > using big or small endian, this way I could use the array module in
> > the
> I would like to have a test to tell me if the current machine is
> using big or small endian, this way I could use the array module in
> the first case and the *slower* struct module on the second. I looked
> but did not find. Is there a python function to know that?
There is no such test, as
> How about sys.byteorder?
This doesn't help, as he wants to read files from varying endianess - what
the _current_ endianess is doesn't matter here.
--
Regards,
Diez B. Roggisch
--
http://mail.python.org/mailman/listinfo/python-list
biner wrote:
> I would like to have a test to tell me if the current machine is
> using big or small endian, this way I could use the array module in
> the first case and the *slower* struct module on the second. I looked
> but did not find. Is there a python function to know that?
>
> Thanks!
Ho
Hello,
I am using a program that has to read binary data from files coming
from different machines. The file are always written with big endian.
I am using the struct module to read the data and it is fine because I
can specify in the format if the data are to be read with big or small
endian co