def __exit__(self, exc_type, exc_val, exc_tb):
global is_atty
self.refresh(forced=True)
if is_atty:
columns, _ = get_terminal_size()
if self.force_single_line:
print('\n' * len(self.warped_obj), end="")
else:
print('\n' * lines_of_content(self.warped_obj, columns), end="")
global last_output_lines
global overflow_flag
last_output_lines = 0
if overflow_flag:
if not self.no_warning:
print("Detected that the lines of output has been exceeded the height of terminal windows, which \
caused the former output remained and keep adding new lines.")
print("????????, ??????????????, ???????????, ???????????????????")
评论列表
文章目录