backports.shutil_get_terminal_size
A backport of the get_terminal_size function from Python 3.3's shutil.
Decision gist · record as of 2026-08-14
No, unless you are maintaining legacy Python 2 code that requires terminal size detection and cannot upgrade to Python 3. For any modern codebase, use shutil.get_terminal_size() directly from the standard library. The package is abandoned and offers no advantages over the native implementation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- However, the package is abandoned—last commit was 2016-11-03 and no releases since 2014-08-19.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
last release 2014-08-19 (4378 days) · last repo commit 2016-11-03 · 8 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 435,391 downloads/mo, #6,681 on PyPI
Alternatives
Verify before relying
from backports.shutil_get_terminal_size import get_terminal_size
size = get_terminal_size()
print(size.columns, size.lines)- Whether the pure-Python implementation handles all edge cases that the native C version covers
- Current compatibility with Python 2.6 and 2.7 environments still in active use
What it is and what it does
This package backports Python 3.3's shutil.get_terminal_size() function to earlier Python versions that lack it. It returns a named tuple containing the terminal's column count and line count, useful for terminal-aware applications that need to adapt output width and height.
The implementation is written in pure Python rather than C. The package has been abandoned since 2016 with no releases after 2014-08-19, and is primarily relevant for legacy Python 2 codebases; modern Python 3 versions include this function in the standard library.
Use it for
- Detect terminal dimensions in Python 2.6 or 2.7 applications that format output for the current terminal width
- Build terminal-based CLI tools that need to wrap text or position output based on available columns and lines
- Support older Python versions in a codebase that must run across multiple Python generations
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining legacy Python 2 code that requires terminal size detection and cannot upgrade to Python 3.
For any modern codebase, use shutil.get_terminal_size() directly from the standard library. The package is abandoned and offers no advantages over the native implementation.
Install
backports-shutil-get-terminal-size on PyPI
Before you install
Low install friction with no runtime dependencies. However, the package is abandoned—last commit was 2016-11-03 and no releases since 2014-08-19.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from backports.shutil_get_terminal_size import get_terminal_size
size = get_terminal_size()
print(size.columns, size.lines)
Verify before relying
- Whether the pure-Python implementation handles all edge cases that the native C version covers
- Current compatibility with Python 2.6 and 2.7 environments still in active use
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 4,378 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 435,391 / month, #6,681 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.2 |
Evidence: backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “terminal size detection”
- backports.shutil_get_terminal_sizeProvides the get_terminal_size() function for Python versions that…
- binsizeAnalyzes symbol sizes in compiled binaries by parsing ELF files and…
- blessedBlessed provides a clean Python interface for terminal styling,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Terminals packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.
Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.
Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…
Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.
Install it if your application formats text for terminals and handles non-ASCII characters.
Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.
However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
See also pathlib3x · backports.ssl · textwrap3 · backports.zstd · linecache2 · traceback2 · terminaltables · backports.functools-lru-cache · zipfile36