Package translate :: Package misc :: Module wStringIO :: Class CatchStringOutput
[hide private]
[frames] | no frames]

Class CatchStringOutput

source code


catches the output before it is closed and sends it to an onclose method

Instance Methods [hide private]
 
__init__(self, onclose)
Set up the output stream, and remember a method to call on closing
source code
 
close(self)
wrap the underlying close method, to pass the value to onclose before it goes
source code
 
slam(self)
use this method to force the closing of the stream if it isn't closed yet
source code

Inherited from StringIO: __iter__, flush, getvalue, isatty, next, read, readline, readlines, seek, tell, truncate, write, writelines

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, onclose)
(Constructor)

source code 

Set up the output stream, and remember a method to call on closing

Overrides: object.__init__

close(self)

source code 

wrap the underlying close method, to pass the value to onclose before it goes

Overrides: StringIO.close