Beispiel #1
0
 def makeFile(self,contents,mode):
     s = StringIO(contents)
     if "a" in mode:
         s.seek(0,2)
     f = FlushableBuffer(s,mode,max_size_in_memory=1)
     def getvalue():
         return get_buffered_value(f)
     f.getvalue = getvalue
     return f
Beispiel #2
0
 def makeFile(self,contents,mode):
     s = StringIO(contents)
     if "a" in mode:
         s.seek(0,2)
     f = FlushableBuffer(s,mode)
     def getvalue():
         return s.getvalue()
     f.getvalue = getvalue
     return f
Beispiel #3
0
    def makeFile(self, contents, mode):
        s = StringIO(contents)
        if "a" in mode:
            s.seek(0, 2)
        f = FlushableBuffer(s, mode, max_size_in_memory=1)

        def getvalue():
            return get_buffered_value(f)

        f.getvalue = getvalue
        return f
Beispiel #4
0
    def makeFile(self, contents, mode):
        s = StringIO(contents)
        if "a" in mode:
            s.seek(0, 2)
        f = FlushableBuffer(s, mode)

        def getvalue():
            return s.getvalue()

        f.getvalue = getvalue
        return f