PyDL  Version: 0.0.1
pydl.Report Class Reference
Collaboration diagram for pydl.Report:
Collaboration graph

Public Member Functions

def __init__ (self)
 
def print_progress (self)
 

Public Attributes

 progressX
 

Detailed Description

Definition at line 246 of file pydl.py.

Constructor & Destructor Documentation

def pydl.Report.__init__ (   self)

Definition at line 247 of file pydl.py.

247  def __init__(self):
248  self.progressX = collections.OrderedDict()
249 
def __init__(self)
Definition: pydl.py:247

Member Function Documentation

def pydl.Report.print_progress (   self)

Definition at line 250 of file pydl.py.

250  def print_progress(self):
251  if not DEBUG_CLEAR:
252  sys.stdout.write('\033[2J\033[H') #clear screen
253  sys.stdout.flush()
254 
255  for filename, item in self.progressX.items():
256  #FIX: why do i need to test for > 0 ??
257  if(item["total_size"] > 0):
258  percent = float(item["bytes_so_far"] / item["total_size"])
259  bar = ('=' * int(percent * 20)).ljust(20)
260  percent = int(percent * 100)
261  sys.stdout.write("%s [%s] %s%% @ %sMb of %sMb\n" %
262  (filename, bar, percent, int(item["bytes_so_far"] / 1024 / 1024), int(item["total_size"] / 1024 / 1024)))
263  sys.stdout.flush()
264 
265 
def print_progress(self)
Definition: pydl.py:250

Member Data Documentation

pydl.Report.progressX

Definition at line 248 of file pydl.py.


The documentation for this class was generated from the following file: