Definition at line 164 of file progressbar.py.
def progressbar.Bar.__init__ |
( |
|
self, |
|
|
|
marker = '#' , |
|
|
|
left = '|' , |
|
|
|
right = '|' |
|
) |
| |
Definition at line 166 of file progressbar.py.
166 def __init__(self, marker='#', left='|', right='|'):
def __init__(self, marker='#', left='|', right='|')
def progressbar.Bar._format_marker |
( |
|
self, |
|
|
|
pbar |
|
) |
| |
|
private |
Definition at line 170 of file progressbar.py.
171 if isinstance(self.
marker, str):
174 return self.marker.update(pbar)
def _format_marker(self, pbar)
def progressbar.Bar.update |
( |
|
self, |
|
|
|
pbar, |
|
|
|
width |
|
) |
| |
Definition at line 175 of file progressbar.py.
176 percent = pbar.percentage()
177 cwidth = width - len(self.
left) - len(self.
right)
178 marked_width =
int(percent * cwidth // 100)
180 bar = (self.
left + (m*marked_width).ljust(cwidth) + self.
right)
def update(self, pbar, width)
def _format_marker(self, pbar)
The documentation for this class was generated from the following file: