mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-30 22:25:19 +00:00 
			
		
		
		
	Use shutil.get_terminal_size for getting the terminal width if it's available (python >= 3.3)
This commit is contained in:
		| @@ -8,11 +8,11 @@ import sys | ||||
| from .downloader.external import list_external_downloaders | ||||
| from .compat import ( | ||||
|     compat_expanduser, | ||||
|     compat_get_terminal_size, | ||||
|     compat_getenv, | ||||
|     compat_kwargs, | ||||
| ) | ||||
| from .utils import ( | ||||
|     get_term_width, | ||||
|     write_string, | ||||
| ) | ||||
| from .version import __version__ | ||||
| @@ -100,7 +100,7 @@ def parseOpts(overrideArguments=None): | ||||
|         return opts | ||||
|  | ||||
|     # No need to wrap help messages if we're on a wide console | ||||
|     columns = get_term_width() | ||||
|     columns = compat_get_terminal_size().columns | ||||
|     max_width = columns if columns else 80 | ||||
|     max_help_position = 80 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jaime Marquínez Ferrándiz
					Jaime Marquínez Ferrándiz