9.3. pyopus.misc.debug — Debug message generation and output

Debug message generation module

Every PyOPUS module generates debug messages of the form

locationID subsystem: bodyText.

locationID uniquely identifies a Python process on a host. See pyopus.misc.identify for details.

subsystem is a string identifying the PyOPUS subsystem that generated the message.

pyopus.misc.debug.DbgDefaultPrint(msg)[source]

Prints a message via the default printer.

pyopus.misc.debug.DbgMsg(subsystem, text)[source]

Generates a debug message with text in its body. The message originates from the given PyOPUS subsystem.

pyopus.misc.debug.DbgMsgOut(subsystem, text, printer=None)[source]

Generates and prints using the default message printer.

The message originates from the given PyOPUS subsystem.

If printer is specified it is used for printing the message. By default the message is printed with the default printer.

pyopus.misc.debug.DbgSetDefaultPrinter(p)[source]

Sets the default message printer.

If this function is not called the default printer writes messages to stdout.

pyopus.misc.debug.DbgSetup(pTime=False, tPrec=1, prefix=True)[source]

Configure debugging

If prependTime is True a timestamp is prepended to every message.

tPrec is the precision of the timestamp.