On Wed, Jun 10, 2009 at 12:34 AM, Matthew Brett <[email protected]>wrote:
> Hi,
>
> > I am having problem while trying to memory map a simple file (attached as
> > test.txt)
>
> The file looks like a text file, but memmap is for binary files.
> Could that be the problem?
>
> Best,
>
> Matthew
What's the reason again that memmap only works with binary files? Could the
functionality be extended to text files as well?
Python's mmap module support text file mapping, however I am getting another
error this time :(
In [1]: import mmap
In [2]: f = open('test.txt', 'r')
In [3]: map = mmap.mmap(f.fileno(), 0)
---------------------------------------------------------------------------
EnvironmentError Traceback (most recent call last)
/home/gsever/Desktop/src/range_calc/<ipython console> in <module>()
EnvironmentError: [Errno 13] Permission denied
I am on a Linux machine...
gs
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion