{"id":14489,"library":"clint","title":"Clint: Command Line Interface Tools for Python","description":"Clint (Command Line INterface Tools) is a Python package designed to simplify command-line application development. It offers features such as colored text, indented printing, robust column printing, interactive prompting, progress bars, and basic argument parsing. The latest version is 0.5.1, released in 2013, and the project's GitHub repository was archived as read-only in March 2024, indicating it is no longer actively maintained. [2, 4, 6]","status":"abandoned","version":"0.5.1","language":"en","source_language":"en","source_url":"https://github.com/kennethreitz/clint","tags":["cli","command-line","terminal","text-formatting","colors","progress-bar","abandoned"],"install":[{"cmd":"pip install clint","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"symbol":"puts, colored","correct":"from clint.textui import puts, colored"},{"symbol":"indent","correct":"from clint.textui import indent"},{"symbol":"prompt, validators","correct":"from clint.textui import prompt, validators"},{"note":"While `from clint import args` works, `from clint.args import Args` is more direct for accessing the argument parser instance.","wrong":"from clint import args","symbol":"Args","correct":"from clint.args import Args"}],"quickstart":{"code":"from clint.textui import puts, colored, indent, prompt, validators\nimport os\n\nputs(colored.green('Hello, Clint!'))\n\nputs('This text is not indented.')\nwith indent(4, quote=' > '):\n    puts(colored.blue('This text is indented and quoted.'))\n    puts('This is also indented.')\n\n# Example of using a progress bar (requires an iterable)\nputs('\\nProcessing items:')\nitems = range(1, 6)\n# In a real scenario, you'd import progress.bar for this, e.g., from clint.textui import progress\n# For quickstart, a simple loop for demonstration.\nfor i in items:\n    puts(f'  Processing item {i}...')\n    # Simulate work\n    # time.sleep(0.1)\n\n# Example of prompting for input\n# To demonstrate, we'll get a dummy value or use an environment variable for non-interactive tests.\nusername = prompt.query('Enter your username:', default=os.environ.get('CLINT_USERNAME', 'guest'))\nputs(f'Welcome, {username}!')","lang":"python","description":"This quickstart demonstrates key features like colored text, indented output, and user prompting. For actual progress bars, import `progress.bar` from `clint.textui` and wrap an iterable. [1, 2, 6]"},"warnings":[{"fix":"Consider migrating to actively maintained CLI libraries like `Typer`, `Click`, `Rich`, or ` вопрос` for new projects. For existing projects, thoroughly test compatibility with current Python environments.","message":"Clint's GitHub repository was archived in March 2024, and its last release (0.5.1) was in 2013. This indicates the library is no longer maintained, which may lead to compatibility issues with newer Python versions or security vulnerabilities that will not be addressed. [4, 6]","severity":"breaking","affected_versions":"All versions, especially with Python 3.8+"},{"fix":"Ensure you are using Clint 0.3.0 or higher. If encountering `SyntaxError` with `print`, verify your Python environment is correctly running a Python 3 compatible version of Clint. Manually converting with `2to3` was a common workaround for older versions. [5]","message":"Early versions of Clint (pre-0.3.0) had significant Python 3 compatibility issues due to Python 2 'print' statements and string handling. While version 0.3.0 and later addressed many of these, subtle incompatibilities might still arise with very recent Python 3 versions. [5, 6]","severity":"gotcha","affected_versions":"< 0.3.0 (critical), possibly 0.3.0 - 0.5.1 (minor)"},{"fix":"To force color output regardless of TTY detection, set the environment variable `CLINT_FORCE_COLOR=1` before running your application. For Windows, ensure `colorama` (which Clint leverages) is compatible or installed if colors are missing in certain environments. [2]","message":"Color output in the terminal might not appear as expected if the output stream is not a TTY (e.g., when piping output to a file or another command). Clint automatically detects TTY status and disables colors. [2]","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure you have Clint version 0.3.0 or newer installed, as these versions include Python 3 compatibility fixes. If you're stuck on an older codebase, consider manually running `2to3` on the Clint source or upgrading to a newer version of the library. [5, 6]","cause":"Attempting to run a Clint version with Python 2 `print` statements on a Python 3 interpreter. This was a common issue before Clint was updated for Python 3 compatibility. [5, 10, 21]","error":"SyntaxError: invalid syntax (often related to 'print' statement)"},{"fix":"Install the library using pip: `pip install clint`. If using a virtual environment, ensure it is activated before installation. [2, 6, 15]","cause":"The `clint` package is not installed in the Python environment where the script is being executed. [15]","error":"ModuleNotFoundError: No module named 'clint'"},{"fix":"Rename any local file named `clint.py` to something else to avoid module name conflicts. Clear your Python environment's `.pyc` files if the issue persists.","cause":"This usually happens if you have a file named `clint.py` in your project directory or Python path, which shadows the installed `clint` package. [17]","error":"AttributeError: 'module' object has no attribute 'textui'"}],"ecosystem":"pypi"}