[Checkins] SVN: z3c.extfile/trunk/src/z3c/extfile/ added seek and
tell to interface
Bernd Dorn
bernd.dorn at fhv.at
Mon Aug 14 15:29:22 EDT 2006
Log message for revision 69493:
added seek and tell to interface
Changed:
U z3c.extfile/trunk/src/z3c/extfile/hashdir.txt
U z3c.extfile/trunk/src/z3c/extfile/interfaces.py
-=-
Modified: z3c.extfile/trunk/src/z3c/extfile/hashdir.txt
===================================================================
--- z3c.extfile/trunk/src/z3c/extfile/hashdir.txt 2006-08-14 18:38:52 UTC (rev 69492)
+++ z3c.extfile/trunk/src/z3c/extfile/hashdir.txt 2006-08-14 19:29:22 UTC (rev 69493)
@@ -67,6 +67,15 @@
>>> f.digest
'0db0e5fa1ecf3e7659504f2e4048434cd9f20d2d'
+
+The seek and tell operations are supported.
+
+ >>> f.seek(1)
+ >>> f.read(10)
+ 'ontent 2'
+
+ >>> f.tell()
+ 9L
We can also get the path of the file.
Modified: z3c.extfile/trunk/src/z3c/extfile/interfaces.py
===================================================================
--- z3c.extfile/trunk/src/z3c/extfile/interfaces.py 2006-08-14 18:38:52 UTC (rev 69492)
+++ z3c.extfile/trunk/src/z3c/extfile/interfaces.py 2006-08-14 19:29:22 UTC (rev 69493)
@@ -24,7 +24,13 @@
def __len__():
"""returns the length/size of file"""
+ def seek(offset, whence=0):
+ """see file.seek"""
+ def tell():
+ """see file.tell"""
+
+
class IWriteFile(IFile):
def write(s):
More information about the Checkins
mailing list