comet.progress ******************************************************************************* .. py:module:: comet.progress The comet.progress module provides functions showing a progress bar during script execution. Methods =============================================================================== .. autofunction:: comet.progress.start .. autofunction:: comet.progress.step .. autofunction:: comet.progress.stop .. autofunction:: comet.progress.unit Examples =============================================================================== .. code-block:: python :caption: Close all open documents and show the progress. #!py #pragma plain import comet def main(): documents = comet.document.getOpen() documentCount = len(documents) #Open the progress bar comet.progress.start('Closing all documents', documentCount) #Close all documents - this can take a while depending on the number and size of documents for document in documents: document.close() #Increment the progress bar and set a new sublabel comet.progress.step(label = f'Closed document {document.getName()}') #Everything finished - close the progress bar comet.progress.stop() return 0