[Numpy-discussion] fromfile and tofile access with a tempfile.TemporaryFile()

Christopher Barker Chris.Barker at noaa.gov
Tue Dec 12 14:25:29 CST 2006


did you try reading and writing to/from that temp file with regular old 
python functions?

-Chris


Tim Hirzel wrote:
>> I'm running linux and the current svn version of numpy. Maybe the 
>> problem is with the tempfile module on windows. Do fromfile and tofile 
>> work for files opened normally?
>>
>> Chuck
> 
> fromfile and tofile work fine on regular files.  From skimming the code 
> a bit, it's hard to imagine numpy code is the culprit, since it must be 
> getting a NULL pointer back from PyFile_AsFile(file)...  Perhaps this is 
> a question for a python dev list?  My gut says it's probably something 
> in the windows tempfile module.  But perhaps in the PyFile_AsFile(file) 
> implementation.  Seems one of those isn't playing nice.  It's all quite 
> mysterious to me...
> 
> tim
> 
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion

-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Numpy-discussion mailing list