def update(self): s = '\x1b[s ' + text.boldblue('[' + self.spinner[self.i] + ']') + ' ' + _message if _status and _message: s += ': ' + _status elif status: s += _status _trace(s + '\x1b[u')
def _stop_spinner(marker = text.boldblue('[*]'), status = ''): global _spinner, _status if _spinner is not None: _lock.acquire() _spinner.running = False s = '\x1b[0K ' + marker + ' ' + _message if status == None: status = _status _status = '' if status and _message: s += ': ' + status elif status: s += status _trace(s + '\n\x1b[?25h') # show cursor _lock.release() _spinner = None
def _stop_spinner(marker=text.boldblue('[*]'), status=''): global _spinner, _status if _spinner is not None: _lock.acquire() _spinner.running = False s = '\x1b[0K ' + marker + ' ' + _message if status == None: status = _status _status = '' if status and _message: s += ': ' + status elif status: s += status _trace(s + '\n\x1b[?25h') # show cursor _lock.release() _spinner = None
def info(s): trace(''.join([' ', text.boldblue('[*]'), ' ', s, '\n']))
def waitfor(s): global _message _message = s trace(''.join([' ', text.boldblue('[*]'), ' ', s, '...\n']))