def _print_progress(self): if os.path.isfile(self._destination): self._file_size = os.path.getsize(self._destination) text = "{:.2%} ({}k)".format(self._percent, self._progress) terminal.pop() terminal.push(text) terminal.flush()
def _read(self, prompt): terminal.push(prompt) terminal.write(' ') input = terminal.input(single=self._single, initial=self._initial_input) valid = self._do_input(input) if not valid: terminal.pop() return valid