summaryrefslogtreecommitdiff
path: root/smmap/mman.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-13 22:48:55 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-13 22:48:55 +0200
commita51b65d35d402791f774efe95d4b848cc524a403 (patch)
treec0c25cc4fc9bd8612ca758320a8db6480bea762a /smmap/mman.py
parent78cdb214fb6273169433fa662ad630afc26eb36a (diff)
downloadsmmap-a51b65d35d402791f774efe95d4b848cc524a403.tar.gz
Finished tutorial section, umproved capabilities of the buffer implementation to be more pythonic. Unfortunately, not all docs build yet because of some typical sphinx issue that results in an error which doesn't at all tell what the culprit actually is
Diffstat (limited to 'smmap/mman.py')
-rw-r--r--smmap/mman.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/smmap/mman.py b/smmap/mman.py
index 9629eca..deba998 100644
--- a/smmap/mman.py
+++ b/smmap/mman.py
@@ -11,17 +11,16 @@ from weakref import ref
import sys
from sys import getrefcount
-__all__ = ["StaticWindowMapManager", "SlidingWindowMapManager"]
+__all__ = ["StaticWindowMapManager", "SlidingWindowMapManager", "WindowCursor"]
#{ Utilities
#}END utilities
-
class WindowCursor(object):
"""Pointer into the mapped region of the memory manager, keeping the map
alive until it is destroyed and no other client uses it.
-
+
Cursors should not be created manually, but are instead returned by the SlidingWindowMapManager
:note: The current implementation is suited for static and sliding window managers, but it also means
that it must be suited for the somewhat quite different sliding manager. It could be improved, but
@@ -85,6 +84,7 @@ class WindowCursor(object):
def use_region(self, offset = 0, size = 0, flags = 0):
"""Assure we point to a window which allows access to the given offset into the file
+
:param offset: absolute offset in bytes into the file
:param size: amount of bytes to map. If 0, all available bytes will be mapped
:param flags: additional flags to be given to os.open in case a file handle is initially opened