| 77 | self.out("please hit enter to trigger a refresh") |
| 78 | |
| 79 | def print_output(self): |
| 80 | arr, cpos = self.paint() |
| 81 | arr[cpos[0] : cpos[0] + 1, cpos[1] : cpos[1] + 1] = ["~"] |
| 82 | |
| 83 | def print_padded(s): |
| 84 | return self.out(s.center(self.width + 8, "X")) |
| 85 | |
| 86 | print_padded("") |
| 87 | print_padded(' enter -> "/", rewind -> "\\", ') |
| 88 | print_padded(' reload -> "|", pastebin -> "$", ') |
| 89 | print_padded(' "~" is the cursor ') |
| 90 | print_padded("") |
| 91 | self.out("X``" + ("`" * (self.width + 2)) + "``X") |
| 92 | for line in arr: |
| 93 | self.out("X```" + line.ljust(self.width) + "```X") |
| 94 | logger.debug("line:") |
| 95 | logger.debug(repr(line)) |
| 96 | self.out("X``" + ("`" * (self.width + 2)) + "``X") |
| 97 | self.out("X" * (self.width + 8)) |
| 98 | return max(len(arr) - self.height, 0) |
| 99 | |
| 100 | def get_input(self): |
| 101 | chars = list(self.orig_stdin.readline()[:-1]) |