mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-17 22:55:42 +07:00
Use shutil.get_terminal_size for getting the terminal width if it's available (python >= 3.3)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
compat_basestring,
|
||||
compat_cookiejar,
|
||||
compat_expanduser,
|
||||
compat_get_terminal_size,
|
||||
compat_http_client,
|
||||
compat_kwargs,
|
||||
compat_str,
|
||||
@@ -46,7 +47,6 @@
|
||||
ExtractorError,
|
||||
format_bytes,
|
||||
formatSeconds,
|
||||
get_term_width,
|
||||
locked_file,
|
||||
make_HTTPS_handler,
|
||||
MaxDownloadsReached,
|
||||
@@ -284,7 +284,7 @@ def __init__(self, params=None, auto_init=True):
|
||||
try:
|
||||
import pty
|
||||
master, slave = pty.openpty()
|
||||
width = get_term_width()
|
||||
width = compat_get_terminal_size().columns
|
||||
if width is None:
|
||||
width_args = []
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user