Class P4.Progress

Description

The P4.Progress class is a handler class that provides access to progress indicators from the server. After defining the progress class, set P4.progress to an instance of a subclass of P4.Progress, use p4.using_progress( MyProgress() ), or pass the progress indicator as a named parameter for one statement only.

You must implement all five of the following methods: init(), setDescription(), update(), setTotal(), and done(), even if the implementation consists of trivially returning 0.

Instance Attributes

None.

Class Methods

class MyProgress( P4.Progress )

Constructs a new subclass of P4.Progress.

Instance Methods

progress.init() -> int

Initialize progress indicator.

progress.setDescription( string, int ) -> int

Description and type of units to be used for progress reporting.

progress.update() -> int

If non-zero, user has requested a cancellation of the operation.

progress.setTotal( <total> ) -> int

Total number of units expected (if known).

progress.done() -> int

If non-zero, operation has failed.