Pretty column-formatted and color-coded dir() output using Rich.
Project description
dircol
dircol provides two small helpers, dirc and dirfc, that display the output of Python's built-in dir() function in a cleaner, more readable layout.
This is useful when exploring unfamiliar objects or browsing large libraries in the Python REPL.
Features
| Function | Output | Color Coding | Purpose |
|---|---|---|---|
dirc(obj) |
Columns | No | Simple, compact directory listing |
dirfc(obj) |
Columns | Yes | Highlights whether attributes are modules, classes, methods, functions, or built-ins |
dirfc uses Rich to color-code attribute names according to their type:
- Blue = Module
- Green = Class
- Yellow = Method
- Magenta = Function
- Gray = Built-in
- White = Everything else
Example
from dircol import dirc, dirfc
dirc(str) # simple column view
dirfc(str) # fancy, color-coded view
Install
pip install dircol
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dircol-0.1.0.tar.gz.
File metadata
- Download URL: dircol-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fad55e1ad8047eada13a35602974286a15894a7cda9288a4b8af0b46f368b4
|
|
| MD5 |
1806b7bca05a833a8bbaec7f3a6cc39a
|
|
| BLAKE2b-256 |
aec53395cc3fd2fc85eb552a52ac19062ec0979e7ef198c70fa2cfedcaa3151d
|
File details
Details for the file dircol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dircol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbf59c3051793711c35252181f5f84ffc0a859ea4598a360a1568bfe1014c3d5
|
|
| MD5 |
7ee828de935097526029700041a3f9d3
|
|
| BLAKE2b-256 |
4311886cae371eda46d4716831e23eb335247fe370d3af42920504f74908efff
|