Package perforce :: Module results :: Class IOutputConsumer
[frames] | no frames]

Class IOutputConsumer



                    object --+    
                             |    
protocols.interfaces.Interface --+
                                 |
                                IOutputConsumer

This interface class declares the interface that consumers of Perforce command output must provide.

Nested Classes

Inherited from protocols.interfaces.Interface: __metaclass__

Instance Methods
 
outputMessage(message)
Output a Perforce message.
 
outputRecord(record)
Output a Perforce data record.
 
outputForm(form)
Output a Perforce form.
 
outputBinary(data)
Output a chunk of binary file data.
 
outputText(data)
Output a chunk of binary file data.
 
finished()
Called when the command has finished running.

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

outputMessage(message)

 
Output a Perforce message.
Parameters:
  • message (perforce.api.Error) - The info, warning or error message being output by the Perforce command. The kind of message is determined by calling the message.is*() methods. The textual representation of the message is obtainable by message.format().

outputRecord(record)

 
Output a Perforce data record.
Parameters:
  • record (dict) - The data record to output. The fields of the record are stored in key/value pairs of the dictionary. The contents of the record depend on the command being run.

outputForm(form)

 
Output a Perforce form.
Parameters:
  • form (perforce.forms.Form) - The form to output. This method is typically called when running a form-based command with the '-o' flag.

outputBinary(data)

 

Output a chunk of binary file data.

Output of large files may call this method several times to allow output of the file in chunks rather than storing it all in memory.
Parameters:
  • data (str) - The chunk of file data to output. The string may be interpreted as an array of bytes.

Note: No end-of-line conversion should be performed on this data when outputting it.

outputText(data)

 

Output a chunk of binary file data.

Output of large files may call this method several times to allow output of the file in chunks rather than storing it all in memory.
Parameters:
  • data (str) - The chunk of file data to output. The string may be interpreted as an array of bytes.

Note: End-of-line conversion may be performed on this data when outputting it.