(self)
Setup the main screen, progress bars and logging box
Setup the main screen, progress bars and logging box
Setup the main screen progress bars and logging box
def __init__(self):
        """
        Setup the main screen, progress bars and logging box
        """
        self.screen = curses.initscr()
        curses.curs_set(0)

        curses.start_color()
        curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK)
        curses.init_pair(2, curses.COLOR_GREEN, curses.COLOR_BLACK)
        curses.init_pair(3, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
        curses.init_pair(4, curses.COLOR_CYAN, curses.COLOR_BLACK)
        curses.init_pair(5, curses.COLOR_BLUE, curses.COLOR_BLACK)
        curses.init_pair(6, curses.COLOR_YELLOW, curses.COLOR_BLACK)

        self.height, self.width = self.screen.getmaxyx()
        self.screen.border()

        self.preptotal()
        self.prepcurrent()
        self.preplog()
        self.banner()
        self.sig()

        self.drives = len(glob.glob("/dev/sd?1"))
        self.donedrives = 0
        self.prevprogress = 0
        self.loglines = []
        self.idx = 1
def __init__ ( self ) : self . screen = curses . initscr ( ) curses . curs_set ( 0 ) curses . start_color ( ) curses . init_pair ( 1 , curses . COLOR_RED , curses . COLOR_BLACK ) curses . init_pair ( 2 , curses . COLOR_GREEN , curses . COLOR_BLACK ) curses . init_pair ( 3 , curses . COLOR_MAGENTA , curses . COLOR_BLACK ) curses . init_pair ( 4 , curses . COLOR_CYAN , curses . COLOR_BLACK ) curses . init_pair ( 5 , curses . COLOR_BLUE , curses . COLOR_BLACK ) curses . init_pair ( 6 , curses . COLOR_YELLOW , curses . COLOR_BLACK ) self . height , self . width = self . screen . getmaxyx ( ) self . screen . border ( ) self . preptotal ( ) self . prepcurrent ( ) self . preplog ( ) self . banner ( ) self . sig ( ) self . drives = len ( glob . glob ( "/dev/sd?1" ) ) self . donedrives = 0 self . prevprogress = 0 self . loglines = [ ] self . idx = 1