module loghelper.buffered_flog

Inheritance diagram of pyquickhelper.loghelper.buffered_flog

Short summary

module pyquickhelper.loghelper.buffered_flog

Buffer as a logging function.

source on GitHub

Classes

class

truncated documentation

BufferedPrint

Buffered display. Relies on io.StringIO. Use it as follows:

Methods

method

truncated documentation

__init__

constructor

__str__

Returns the content.

fprint

print function

Documentation

Buffer as a logging function.

source on GitHub

class pyquickhelper.loghelper.buffered_flog.BufferedPrint[source]

Bases: object

Buffered display. Relies on io.StringIO. Use it as follows:

<<<

def do_something(fLOG=None):
    if fLOG:
        fLOG("Did something.")
    return 3


from pyquickhelper.loghelper import BufferedPrint
buf = BufferedPrint()
do_something(fLOG=buf.fprint)
print(buf)

>>>

    Did something.

source on GitHub

constructor

__init__()[source]

constructor

__str__()[source]

Returns the content.

fprint(*args, **kwargs)[source]

print function