[SciPy-user] fread (from numpyio) and stderr redirection...

fred fredmfp@gmail....
Sun Jun 10 17:32:31 CDT 2007


I want to test that data read from file with fread has exactly the right 

- if less bytes are read that the required number of bytes, how can it 
be detected ?

- if more bytes are tried to read, fread returns a warning message that 
I don't want to be displayed.
How can I do this ?

I have attached a sample file that shows the three cases:

- data read from file has the right dimension: ok

- data read from file has 1 byte instead of 2: no detection error

- try to read from file 3 bytes instead of 2: warning message displayed

Any suggestion ?

Thanks in advance.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: essai.py
Type: text/x-python
Size: 993 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20070611/22c2cf19/attachment.py 

More information about the SciPy-user mailing list