Package topo :: Package misc :: Module util :: Class MultiFile
[hide private]
[frames] | no frames]

Class MultiFile

source code


For all file_like_objs passed on initialization, provides a convenient way to call any of file's methods (on all of them).

E.g. The following would cause 'test' to be written into two files, as well as to stdout:

import sys f1 = open('file1','w') f2 = open('file2','w') m = MultiFile(f1,f2,sys.stdout) m.write('test')

Instance Methods [hide private]
 
__init__(self, *file_like_objs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__provide_file_methods(self) source code

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, *file_like_objs)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)