python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Package app :: Module shell :: Class ProgressBar
[hide private]

Class ProgressBar

source code

A 2-line progress bar, which looks like:

                           Header
   20% [===========----------------------------------]

The progress bar is colored, if the terminal supports color output; and adjusts to the width of the terminal.

Instance Methods [hide private]
 
__init__(self, term) source code
 
update(self, percent=None, message=None)
Updates the progress bar.
source code
 
update_message(self, message)
Updates the message of the progress bar.
source code
 
clear(self)
Clears the progress bar (i.e.
source code
Class Variables [hide private]
  BAR = '%3d%% ${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMAL}'
  HEADER = '${BOLD}${CYAN}%s${NORMAL}\n'
Instance Variables [hide private]
  cleared
true if we haven't drawn the bar yet.
Method Details [hide private]

update(self, percent=None, message=None)

source code 

Updates the progress bar.

Parameters:
  • percent - the percentage to be shown. If None, the previous value will be used.
  • message - the message to be shown above the progress bar. If None, the previous message will be used.

update_message(self, message)

source code 

Updates the message of the progress bar.

Parameters:
  • message - the message to be shown above the progress bar

clear(self)

source code 

Clears the progress bar (i.e. removes it from the screen)


   Home       Trees       Indices       Help