-
Notifications
You must be signed in to change notification settings - Fork 1
/
bar.py
executable file
·36 lines (30 loc) · 1.09 KB
/
bar.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
34
35
36
# vim: set fileencoding=utf8 :
#generic statusbar class
class Bar(object):
#every function in this prototype/stub thing just calls this
def unimplemented(self):
raise Exception('That functionality has not been implemented for this status bar.')
#start up the status bar
def start(self):
self.unimplemented()
#stop the status bar
def stop(self):
self.unimplemented()
#find out if the status bar is currently running
#returns True or False
def is_running(self):
self.unimplemented()
#the core work routine. put some text on the bar
def put_text(self,text):
self.unimplemented()
#set the colors, if color='' then reset to default color
def set_foreground_color(self,color=''):
self.unimplemented()
def set_background_color(self,color=''):
self.unimplemented()
#set the alignment to left, right, or center
def set_text_alignment(self,align):
self.unimplemented()
#do whatever housekeeping and flush everything out so it shows up
def flush(self):
self.unimplemented()