tree representation of Python data

Weatherby,Gerard gweatherby at uchc.edu
Sat Jan 21 15:32:17 EST 2023


https://docs.python.org/3/library/pprint.html

From: Python-list <python-list-bounces+gweatherby=uchc.edu at python.org> on behalf of Dino <dino at no.spam.ar>
Date: Saturday, January 21, 2023 at 11:42 AM
To: python-list at python.org <python-list at python.org>
Subject: tree representation of Python data
*** Attention: This is an external email. Use caution responding, opening attachments or clicking on links. ***

I have a question that is a bit of a shot in the dark. I have this nice
bash utility installed:

$ tree -d unit/
unit/
├── mocks
├── plugins
│   ├── ast
│   ├── editor
│   ├── editor-autosuggest
│   ├── editor-metadata
│   ├── json-schema-validator
│   │   └── test-documents
│   └── validate-semantic
│       ├── 2and3
│       ├── bugs
│       └── oas3
└── standalone
     └── topbar-insert

I just thought that it would be great if there was a Python utility that
visualized a similar graph for nested data structures.
Of course I am aware of indent (json.dumps()) and pprint, and they are
OK options for my need. It's just that the compact, improved
visualization would be nice to have. Not so nice that I would go out of
my way to build, but nice enough to use an exising package.

Thanks

Dino
--
https://urldefense.com/v3/__https://mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!iGkQhjN2DTLNPZj7JaAhVrakd6oiQrV3IUV08E2ayIK1hWH2AaJ4OQ_uEobpiLQuWde2974mF41mvsnO$<https://urldefense.com/v3/__https:/mail.python.org/mailman/listinfo/python-list__;!!Cn_UX_p3!iGkQhjN2DTLNPZj7JaAhVrakd6oiQrV3IUV08E2ayIK1hWH2AaJ4OQ_uEobpiLQuWde2974mF41mvsnO$>


More information about the Python-list mailing list