Re: Pretty-print a directory tree

Top Page
Attachments:
Message as email
+ (text/html)
+ (text/plain)
Delete this message
Reply to this message
Author: Rob Mike via PLUG-discuss
Date:  
To: plug-discuss
CC: Rob Mike
Subject: Re: Pretty-print a directory tree
Just testing to see if I can get into a thread.

 

- Victor

 
 

Sent: Friday, December 09, 2022 at 4:07 PM
From: "greg zegan via PLUG-discuss" <>
To: "Main PLUG discussion list" <>
Cc: "greg zegan" <>
Subject: Re: Pretty-print a directory tree



 

Hello,

  I just ran that now and it has an error by this line:

 yield from cls.make_tree(path, parent=displayable_root,is_last=is_last,criteria=criteria)

At or around line 40.

please advise.

thanks,

Greg

 




On Friday, December 9, 2022 at 01:42:29 PM MST, James Mcphee via PLUG-discuss <> wrote:

 

 




https://stackoverflow.com/questions/9727673/list-directory-tree-structure-in-python
 



On Fri, Dec 9, 2022 at 12:07 PM T Zack Crawford via PLUG-discuss <> wrote:


The command utility `pass` has something looking almost exactly like this. It's a password manager that's really more like a frontend wrapper for decrypting gpg files located in ~/.password-store . It's not a very complicated program, maybe check out the source code to see what they do. https://www.passwordstore.org/

 

Dec 9, 2022 09:58:22 Thomas Scott via PLUG-discuss <>:




Is the utility `tree` an option? You can also use a subprocess call to call it from within Python. 

 






Best Regards, 

-Thomas Scott






 


On Fri, Dec 9, 2022 at 11:53 AM trent shipley via PLUG-discuss <> wrote:


 
Does anyone know how to get an ASCII/Unicode pretty-print of a directory tree, preferably using a Python library or utility.    I wanted one to ask a list for help, but my Google-foo was not up to the task.  A working Google search string would be even better than "here follow the link to the utility on GitHub."

 

 

Trent

 

 


/home/user/Projects/flask-tutorial
├── flaskr/
│   ├── __init__.py
│   ├── db.py
│   ├── schema.sql
│   ├── auth.py
│   ├── blog.py
│   ├── templates/
│   │   ├── base.html
│   │   ├── auth/
│   │   │   ├── login.html
│   │   │   └── register.html
│   │   └── blog/
│   │       ├── create.html
│   │       ├── index.html
│   │       └── update.html
│   └── static/
│       └── style.css
├── tests/
│   ├── conftest.py
│   ├── data.sql
│   ├── test_factory.py
│   ├── test_db.py
│   ├── test_auth.py
│   └── test_blog.py
├── venv/
├── setup.py
└── MANIFEST.in



---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss




---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss


 

 
--

James McPhee




---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss



--------------------------------------------------- PLUG-discuss mailing list: To subscribe, unsubscribe, or to change your mail settings: https://lists.phxlinux.org/mailman/listinfo/plug-discuss



---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss