Class P4.OutputHandler

Description

The P4.OutputHandler class is a handler class that provides access to streaming output from the server. After defining the output handler, set p4.handler to an instance of a subclass of P4.OutputHandler, use p4.using_handler( MyHandler() ), or pass the handler as a named parameter for one statement only.

By default, P4.OutputHandler returns REPORT for all output methods. The different return options are:

Value Meaning

REPORT

Messages added to output (don’t handle, don’t cancel)

HANDLED

Output is handled by class (don’t add message to output).

REPORT|CANCEL

Operation is marked for cancel, message is added to output.

HANDLED|CANCEL

Operation is marked for cancel, message not added to output.

Class Methods

class MyHandler( P4.OutputHandler )

Constructs a new subclass of P4.OutputHandler.

Instance Methods

outputBinary -> int

Process binary data.

outputInfo -> int

Process tabular data.

outputMessage -> int

Process informational or error messages.

outputStat -> int

Process tagged data.

outputText -> int

Process text data.