Classes | Functions | Variables
progressbar Namespace Reference

Classes

class  Bar
 
class  ETA
 
class  FileTransferSpeed
 
class  Percentage
 
class  ProgressBar
 
class  ProgressBarWidget
 
class  ProgressBarWidgetHFill
 
class  ReverseBar
 
class  RotatingMarker
 
class  Total
 
class  Value
 

Functions

def example1 ()
 
def example2 ()
 
def example3 ()
 
def example4 ()
 

Variables

string __author__ = "Nilton Volpato"
 
string __author_email__ = "first-name dot last-name @ gmail.com"
 
string __date__ = "2006-05-07"
 
string __version__ = "2.2"
 
list default_widgets = [Percentage(), ' ', Bar()]
 

Function Documentation

def progressbar.example1 ( )

Definition at line 326 of file progressbar.py.

326  def example1():
327  widgets = ['Test: ', Percentage(), ' ', Bar(marker=RotatingMarker()),
328  ' ', ETA(), ' ', FileTransferSpeed()]
329  pbar = ProgressBar(widgets=widgets, maxval=10000000).start()
330  for i in range(1000000):
331  # do something
332  pbar.update(10*i+1)
333  pbar.finish()
334  print()
335 
def example1()
Definition: progressbar.py:326
def progressbar.example2 ( )

Definition at line 336 of file progressbar.py.

336  def example2():
337  class CrazyFileTransferSpeed(FileTransferSpeed):
338  "It's bigger between 45 and 80 percent"
339  def update(self, pbar):
340  if 45 < pbar.percentage() < 80:
341  return 'Bigger Now ' + FileTransferSpeed.update(self,pbar)
342  else:
343  return FileTransferSpeed.update(self,pbar)
344 
345  widgets = [CrazyFileTransferSpeed(),' <<<', Bar(), '>>> ', Percentage(),' ', ETA()]
346  pbar = ProgressBar(widgets=widgets, maxval=10000000)
347  # maybe do something
348  pbar.start()
349  for i in range(2000000):
350  # do something
351  pbar.update(5*i+1)
352  pbar.finish()
353  print()
354 
def example2()
Definition: progressbar.py:336
def progressbar.example3 ( )

Definition at line 355 of file progressbar.py.

355  def example3():
356  widgets = [Bar('>'), ' ', ETA(), ' ', ReverseBar('<')]
357  pbar = ProgressBar(widgets=widgets, maxval=10000000).start()
358  for i in range(1000000):
359  # do something
360  pbar.update(10*i+1)
361  pbar.finish()
362  print()
363 
def example3()
Definition: progressbar.py:355
def progressbar.example4 ( )

Definition at line 364 of file progressbar.py.

364  def example4():
365  widgets = ['Test: ', Percentage(), ' ',
366  Bar(marker='0',left='[',right=']'),
367  ' ', ETA(), ' ', FileTransferSpeed()]
368  pbar = ProgressBar(widgets=widgets, maxval=500)
369  pbar.start()
370  for i in range(100,500+1,50):
371  time.sleep(0.2)
372  pbar.update(i)
373  pbar.finish()
374  print()
375 
376 
def example4()
Definition: progressbar.py:364

Variable Documentation

string progressbar.__author__ = "Nilton Volpato"
private

Definition at line 45 of file progressbar.py.

string progressbar.__author_email__ = "first-name dot last-name @ gmail.com"
private

Definition at line 46 of file progressbar.py.

string progressbar.__date__ = "2006-05-07"
private

Definition at line 47 of file progressbar.py.

string progressbar.__version__ = "2.2"
private

Definition at line 48 of file progressbar.py.

list progressbar.default_widgets = [Percentage(), ' ', Bar()]

Definition at line 193 of file progressbar.py.