Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dircol-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dircol-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for dircol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 17fad55e1ad8047eada13a35602974286a15894a7cda9288a4b8af0b46f368b4
MD5 1806b7bca05a833a8bbaec7f3a6cc39a
BLAKE2b-256 aec53395cc3fd2fc85eb552a52ac19062ec0979e7ef198c70fa2cfedcaa3151d

See more details on using hashes here.

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

Hashes for dircol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbf59c3051793711c35252181f5f84ffc0a859ea4598a360a1568bfe1014c3d5
MD5 7ee828de935097526029700041a3f9d3
BLAKE2b-256 4311886cae371eda46d4716831e23eb335247fe370d3af42920504f74908efff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page