File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11"""Utility functions related to terminal output."""
22
3- import os
43import re
4+ import shutil
55from textwrap import TextWrapper
66from typing import Any
77
@@ -34,7 +34,7 @@ def terminal_columns() -> int:
3434 terminal environment variables then DEFAULT_TERMINAL_COLUMNS we be returned.
3535 """
3636 try :
37- columns = os .get_terminal_size ().columns or DEFAULT_TERMINAL_COLUMNS
37+ columns = shutil .get_terminal_size ().columns or DEFAULT_TERMINAL_COLUMNS
3838 except OSError :
3939 columns = DEFAULT_TERMINAL_COLUMNS
4040
@@ -88,7 +88,7 @@ def clear_page() -> None:
8888 printing the next information.
8989 """
9090 try :
91- num_lines = os .get_terminal_size ().lines
91+ num_lines = shutil .get_terminal_size ().lines
9292 except OSError :
9393 num_lines = DEFAULT_TERMINAL_LINES
9494
Original file line number Diff line number Diff line change 11"""Utility functions."""
22
3- import os
3+ import shutil
44from argparse import ArgumentTypeError
55from typing import List , Tuple
66
2222
2323
2424def terminal_columns () -> int :
25- return os .get_terminal_size ().columns or DEFAULT_TERMINAL_COLUMNS
25+ return shutil .get_terminal_size ().columns or DEFAULT_TERMINAL_COLUMNS
2626
2727
2828def address_to_filename (target : SBTarget , address : int ) -> str :
You can’t perform that action at this time.
0 commit comments