Definition at line 246 of file pydl.py.
def pydl.Report.__init__ |
( |
|
self | ) |
|
def pydl.Report.print_progress |
( |
|
self | ) |
|
Definition at line 250 of file pydl.py.
252 sys.stdout.write(
'\033[2J\033[H')
255 for filename, item
in self.progressX.items():
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)))
The documentation for this class was generated from the following file: