Package libprs500 :: Module terminfo :: Class ProgressBar
[hide private]
[frames] | no frames]

Class ProgressBar

source code

A 3-line progress bar, which looks like:
                           Header
   20% [===========----------------------------------]
                      progress message
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, header)
  update(self, percent, message)
  clear(self)

Class Variables [hide private]
  BAR = '%3d%% ${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMA...
  HEADER = '${BOLD}${CYAN}%s${NORMAL}\n\n'

Instance Variables [hide private]
  cleared
true if we haven't drawn the bar yet.

Method Details [hide private]

__init__(self, term, header)
(Constructor)

source code 
None

update(self, percent, message)

source code 
None

clear(self)

source code 
None

Class Variable Details [hide private]

BAR

None
Value:
'''%3d%% ${GREEN}[${BOLD}%s%s${NORMAL}${GREEN}]${NORMAL}
'''                                                                    
      

HEADER

None
Value:
'''${BOLD}${CYAN}%s${NORMAL}

'''                                                                    
      

Instance Variable Details [hide private]

cleared

true if we haven't drawn the bar yet.