Example #1
0
File: tools.py Project: tek/pytek
 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()
Example #2
0
 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