def __init__(self, time=None, notnow=True, in_sec=False): console.codes['bg_gray'] = '\x1b[01;40m' self.font = FonteZokis() self.timing = 5 self.cls = self.font.cls if time: self.timing = time if not in_sec: self.timing = int(self.timing * 60) if notnow: raw_input("Press Enter") else: self.in_set_time()
def __init__(self, time=None, notnow=True, in_sec=False, times=None): console.codes['bg_gray'] = '\x1b[01;40m' self.font = FonteZokis() self.timing = 5 if times and times <= 1: print ('Usage: termtimer.py [options]\n' + '\n' + 'termtimer.py: error: -x option require a value greater than 1') sys.exit(ERROR) self.times_fix = times and times - 1 or None self.times = self.times_fix self.cls = self.font.cls if time: self.timing = time if not in_sec: self.timing = int(self.timing * 60) if notnow: raw_input("Press Enter") else: self.in_set_time()