On Fri, Jan 9, 2009 at 06:05, Neal Becker <ndbeck...@gmail.com> wrote: > I'm working on interfacing to a custom FPGA board. The kernel driver exposes > the FPGA memory via mmap. > > It might be nice to use numpy memmap to read/write data. One issue is that I > think I will need to create the memmap array from a fd, not a file name. The > reason is I wrote the driver to only allow 1 exclusive open, and I already > have it open for other reasons. Any chance to create a memmap array from a > fd?
Use os.fdopen(fd) to create a file object which can be passed to the memmap constructor. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion