Registry / testing / fancycompleter

fancycompleter

JSON →
library0.11.1pypypi✓ verified 25d ago

Fancy Completer (fancycompleter) is a Python module that enhances the interactive Python prompt with colorful, context-aware TAB completion, extending the functionality of the standard library's `rlcompleter`. It highlights different types of completions (strings, functions, numbers, etc.) with distinct colors, improving readability and user experience. The current version is 0.11.1 and it appears to be actively maintained with recent updates and discussions around its integration into CPython.

pip install fancycompleter
INSTALL
IMPORT
SIG · FANCYCOMPLETER
F
fancycompleter
testingpythonv0.11.1
Install
1.6s avg
Import
34ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.11.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.036s · 18.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.032s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fancycompleter
import fancycompleter

The primary way to use fancycompleter is by calling `fancycompleter.interact()` to launch an enhanced interactive console. For automatic activation upon Python startup, use the `python -m fancycompleter install` command, which configures the `PYTHONSTARTUP` environment variable.

import fancycompleter # To start the fancycompleter-enhanced interactive console: fancycompleter.interact(persist_history=True) # Alternatively, to enable it automatically upon Python startup, # you can run 'python -m fancycompleter install' once, # which typically creates/updates your PYTHONSTARTUP script.
Debug
Known issues
gotchaWhen enabling `fancycompleter` via a `PYTHONSTARTUP` script, the `fancycompleter.interact()` call typically uses a `sys.exit()` upon console termination. This means any Python code written *after* `fancycompleter.interact()` in the startup script might not be executed. It's recommended to place it as the last line.
fix
Ensure `fancycompleter.interact()` is the final statement in your `PYTHONSTARTUP` script.
affects: <=0.11.1
gotchaColorized completion may not work out-of-the-box on some CPython installations, particularly older versions on Linux/OSX (< Python 3.13) that rely on GNU `readline`, as `readline` often strips escape sequences. PyPy and CPython 3.13+ are noted to work out of the box. For other CPython versions, `pyrepl` is typically installed as a dependency for colors.
fix
Ensure `pyrepl` is installed (usually as a dependency). If issues persist, refer to the documentation for details on readline patches or alternative setups. Python 3.13+ users should have colors by default.
affects: <=0.11.1 (CPython < 3.13)
gotchaUnlike the standard `rlcompleter`, `fancycompleter` explicitly disables the behavior of automatically adding an open parenthesis `(` when completing a callable name. This is an intentional design choice to reduce annoyance.
fix
Be aware of this behavioral difference if migrating from `rlcompleter`. You will need to manually type the opening parenthesis after completing callable names.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'fancycompleter'
The 'fancycompleter' package is not installed in the active Python environment or the environment is not correctly configured for Python to find the installed package.
fix
Ensure the package is installed using pip: `pip install fancycompleter`
AttributeError: module 'collections' has no attribute 'Callable'
This error typically occurs on Windows with Python 3.11 or newer due to an incompatibility in the 'pyreadline' dependency (used by fancycompleter) with changes in the 'collections' module.
fix
Install the 'tabcompleter' package, which is a maintained fork of 'fancycompleter' that addresses this issue by using 'pyreadline3': `pip install tabcompleter` (and then use `import tabcompleter; tabcompleter.interact()`).
TypeError: a bytes-like object is required, not 'str'
This error can occur on macOS with Python 3 when fancycompleter attempts to detect the 'libedit' library, leading to a type mismatch in string/bytes comparisons within the detection logic, often manifesting as non-functional TAB completion.
fix
This often points to issues with readline or pyrepl setup. Ensure 'pyrepl' is installed, as 'fancycompleter' prefers it for better functionality. If issues persist on macOS, it may require a specific patched readline or a compatible environment.
ModuleNotFoundError: No module named 'distutils'
This error occurs in Python versions 3.12 and above because the 'distutils' module has been removed from the standard library. If 'fancycompleter' or one of its dependencies implicitly relies on 'distutils' during setup or execution, this error will be raised.
fix
Ensure you are using a version of 'fancycompleter' and its dependencies compatible with your Python version. If direct installation fails, consider using 'tabcompleter' (a community-maintained fork) which might have updated dependencies.
Upgrade
Version history
0.11.1latest on PyPI · released May 26, 2025
Audit
Dependencies
pyreplrequiredProvides colored completion on most CPython installations (<3.13), preferred over readline for colors.
pyreadline3optionalAlternative to pyrepl, particularly for Windows.
Agent activity
9 hits · last 30 days
node
8
Resources
fancycompleter — pip install fancycompleter · libregistry