translate.storage.xpi.CatchPotentialOutput

Package translate :: Package storage :: Module xpi :: Class CatchPotentialOutput |
[hide private]
[frames] | no frames]

# Class CatchPotentialOutput

source code

catches output if there has been, before closing

Instance Methods | [hide private]
__init__(self, contents, 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
flush(self) zip files call flush, not close, on file-like objects | source code
slam(self) use this method to force the closing of the stream if it isn't closed yet | source code
Inherited from `misc.wStringIO.StringIO`: `__iter__`, `getvalue`, `isatty`, `next`, `read`, `readline`, `readlines`, `seek`, `tell`, `truncate`, `write`, `writelines` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, contents, 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: misc.wStringIO.StringIO.close

### flush(self) | source code
zip files call flush, not close, on file-like objects Overrides: misc.wStringIO.StringIO.flush