Reading unformatted big-endian files

2006-08-11 Thread Andrea Gavana
Hello John, > (1) Upgrade to 2.5 as soon as it goes final -- struct's performance has > been improved. I would love to, but I have some dependencies (like wxPython, Numeric, py2exe and so on) for which a 2.5 stable release either doesn't exist or is not fully tested or will break my app in some w

Re: Reading unformatted big-endian files

2006-08-11 Thread John Machin
On 11/08/2006 8:35 PM, Andrea Gavana wrote: > I hope performances will not change so much: fortran is > very fast in reading files (but I use it only in this case, I love to > use Python)... well, let's see :-D Well FORTRAN would have to have *something* going for it :-) I vaguely recall in a pr

Reading unformatted big-endian files

2006-08-11 Thread Andrea Gavana
Hello John, >Silently ignoring errors when reading a file doesn't sound like a good >idea to me at all, especially if different records have different >formats. Yeah, you're right, but the file itself is quite big and I am interested only in a small part of it. Moreover, the sequence keyword-numb

Re: Reading unformatted big-endian files

2006-08-11 Thread John Machin
Andrea Gavana wrote: > "err=8" means that, if an error occours in > reading the file, > it should go to the label "8 continue" and continue reading the file Silently ignoring errors when reading a file doesn't sound like a good idea to me at all, especially if different records have different for

Reading unformatted big-endian files

2006-08-11 Thread Andrea Gavana
Hello NG, that may sound a silly question, but I didn't find anything really clear about the issue of reading unformatted big endian files with Python. What I was doing till now, was using Fortran to read those files and compile this Fortran extension using F2PY. Now that it seems th