Skip to content

FuncTextWriter

QuantConnect.Util.FuncTextWriter

FuncTextWriter(writer: Callable[[str], Any])

Bases: TextWriter

Provides an implementation of TextWriter that redirects Write(string) and WriteLine(string)

Initializes a new instance of the FuncTextWriter that will direct messages to the algorithm's Debug function.

Parameters:

Name Type Description Default
writer Callable[[str], Any]

The algorithm hosting the Debug function where messages will be directed

required

encoding

encoding: Encoding

write

write(value: str) -> None

Writes the string value using the delegate provided at construction

Parameters:

Name Type Description Default
value str

The string value to be written

required

write_line

write_line(value: str) -> None

Writes the string value using the delegate provided at construction

Parameters:

Name Type Description Default
value str
required