ogs5py.tools.tools.Output

class ogs5py.tools.tools.Output(file_or_name, print_log=True)[source]

Bases: object

A class to duplicate an output stream to stdout.

Parameters
  • file_or_name (filename or open filehandle (writable)) – File that will be duplicated

  • print_log (bool, optional) – State if log should be printed. Default: True

Methods

close()

Close the file and restore the channel.

flush()

Flush both channels.

write(data)

Write data to both channels.

close()[source]

Close the file and restore the channel.

flush()[source]

Flush both channels.

write(data)[source]

Write data to both channels.