TextIO_or_Logger

(function from pyomo.contrib.solver.config)

pyomo.contrib.solver.config.TextIO_or_Logger(val)[source]

Validates and converts input into a list of valid output streams.

Accepts:
  • sys.stdout

  • Instances of io.TextIOBase

  • logging.Logger (wrapped as LogStream)

  • Boolean values (True -> sys.stdout)

Returns:

  • A list of validated output streams.

Raises:

- ValueError if an invalid type is provided.