The `cursor` library (current version 1.3.5) is a small, cross-platform Python package designed to hide or show the terminal cursor. It provides simple functions for managing cursor visibility in command-line interfaces on both Linux and Windows, and also installs command-line utilities for quick control. Its release cadence is infrequent, indicating a stable and mature utility.
pip install cursorVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to hide the terminal cursor, wait, and then show it again. It includes `atexit.register` to ensure the cursor is always made visible when the script exits, which is a crucial best practice for this library.
Always ensure `cursor.show()` is called when your application is done, or use `atexit.register(cursor.show)` to automatically restore the cursor on script termination.
Ensure you are using the correct library for the type of cursor you intend to control. For graphical cursors, methods within the respective GUI library or OS-specific tools are needed.
Test terminal cursor control in a standard system terminal (e.g., Bash, PowerShell, CMD) to confirm library functionality. Consult your IDE's documentation for specific terminal interaction settings or known issues.
pip install cursor
Verify the correct function name (e.g., `cursor.hide()`, `cursor.show()`) and ensure the library is correctly imported and not shadowed by another variable. Consider upgrading the library with `pip install --upgrade cursor` if using an old version.
Ensure you call the functions with parentheses: `cursor.hide()` and `cursor.show()`.
No dependency data recorded yet.