-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotify_reciver.py
33 lines (22 loc) · 1.04 KB
/
notify_reciver.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import progressbar
class NotifyReciver:
notify_reciver: object
live_data: object
def __init__(self,_notify_reciver):
self.notify_reciver = _notify_reciver
def __call__(self, _string):
#self.notify_reciver.notify(_string)
print(_string)
def setLiveData(self, _string, _value):
self.live_data = progressbar.ProgressBar(widgets=[_string,
progressbar.Bar(),
progressbar.Percentage(),
' ',
progressbar.AdaptiveTransferSpeed(unit='it'),
' ',
progressbar.ETA()],
max_value=_value)
def updateLiveData(self, _value):
self.live_data.update(_value)
def finishLiveData(self):
self.live_data.finish()