[pypy-svn] r46414 - pypy/dist/pypy/translator/sandbox

arigo at codespeak.net arigo at codespeak.net
Sat Sep 8 10:55:00 CEST 2007


Author: arigo
Date: Sat Sep  8 10:55:00 2007
New Revision: 46414

Modified:
   pypy/dist/pypy/translator/sandbox/vfs.py
Log:
Oups, this goes with the previous check-in.


Modified: pypy/dist/pypy/translator/sandbox/vfs.py
==============================================================================
--- pypy/dist/pypy/translator/sandbox/vfs.py	(original)
+++ pypy/dist/pypy/translator/sandbox/vfs.py	Sat Sep  8 10:55:00 2007
@@ -95,6 +95,13 @@
 
 class File(FSObject):
     kind = stat.S_IFREG
+    def __init__(self, data=''):
+        self.data = data
+    def getsize(self):
+        return len(self.data)
+    def open(self):
+        import cStringIO
+        return cStringIO.StringIO(self.data)
 
 class RealFile(File):
     def __init__(self, path):



More information about the Pypy-commit mailing list