recursive filesystem object
Project description
filesystem_autocomplete
utility for recursively mapping files and subdirectories
To use, import walk_directory then supply a starting directory:
>>> from filesystem_autocomplete import walk_directory
>>> dir_info = walk_directory(".")
The resulting object will contain attributes for all files and subdirectories.
From a python shell or jupyter notebook, you can explore the file system using autocomplete. When evaluating, files will print their full path:
>>> dir_info.filesystem_autocomplete.filesystem_autocomplete_py
/home/chavlin/src/dxl/filesystem_autocomplete/filesystem_autocomplete/filesystem_autocomplete.py
directories will print their contents:
>>> dir_info.filesystem_autocomplete
Directory: /home/chavlin/src/dxl/filesystem_autocomplete/filesystem_autocomplete
Files:
__init__.py
filesystem_autocomplete.py
Subdirectories:
__pycache__
tests
To extract the full path for files:
>>> dir_info.filesystem_autocomplete.filesystem_autocomplete_py.filepath
'/home/chavlin/src/dxl/filesystem_autocomplete/filesystem_autocomplete/filesystem_autocomplete.py'
and for directories:
>>> dir_info.filesystem_autocomplete.dirpath
'/home/chavlin/src/dxl/filesystem_autocomplete/filesystem_autocomplete'
handling special characters
Since files and directories are stored as attributes, any invalid characters are replaced with underscores in the object. The full path string contains the original file.
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 filesystem_autocomplete-0.1.0.tar.gz.
File metadata
- Download URL: filesystem_autocomplete-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d80dcd2aa3352d94c83eafb2341a6058a4a42313cc0092870ff5aab15d953c8c
|
|
| MD5 |
7cfd00767476815ccd15ea843f8b1eb7
|
|
| BLAKE2b-256 |
db8fed2fd66971ff56f46ff7d32ebddc00f80e2ea3ab1e8e12dc7f01a3036417
|
File details
Details for the file filesystem_autocomplete-0.1.0-py3-none-any.whl.
File metadata
- Download URL: filesystem_autocomplete-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cca2e92f620c4731ebd2b2afd99d1841697b2bcf2da0825180cf6bcf43a9c0cf
|
|
| MD5 |
962c93ea3619f1f2bf6ee4eef19df006
|
|
| BLAKE2b-256 |
7d1539ecb8c8588b643a722fbb600427d8e05fad9c01c997f069a78ec4dbf00c
|