MCPcopy Index your code
hub / github.com/bpython/bpython / print_output

Method print_output

doc/sphinx/source/simplerepl.py:79–98  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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])

Callers 1

mainFunction · 0.80

Calls 2

outMethod · 0.95
paintMethod · 0.80

Tested by

no test coverage detected