On Fri, Dec 19, 2008 at 3:19 AM, James Paige <b...@hamsterrepublic.com> wrote: > On Fri, Dec 19, 2008 at 02:11:24AM +1300, Ralph Versteegen wrote: >> Besides that, all my other errors are to do with trying to access >> /tmp, and the hdf5 stuff. > > Any direct references to /tmp should be replaced using the tempfile > module. That is the best way to do temp files in a secure and >> RE this comment: >> Skip the BLOAD header (I later found out that memmap has an 'offset' >> parameter, but >> it's granularity is limited to the structure size) >> >> I had a look at numpy/core/memmap.py, and it seems that the >> explanation of the offset parameter given (" 'offset` should be a >> multiple of the byte-size of `dtype` ") is wrong. It's not the offset >> amount that needs to be a multiple of the size of the data type, it's > cross-platform way in python. Cool, now I just need to figure out how to use it. I've avoided it in the past because it didn't seem to fit very well. Looks like I need to use mkdtemp() and then chuck files in there.
>> the length of the remainder of the file. I removed the BLOAD header >> from gen_dtype and specified a 7 byte offset, and sure enough it >> worked. > > That ought to be reported as a doc bug to the numpy devs. I filed a bug: http://scipy.org/scipy/numpy/ticket/971 Esti multampleksa. David _______________________________________________ Ohrrpgce mailing list ohrrpgce@lists.motherhamster.org http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org