Skip to main content

shutil_extra

extra utils

Build/Upload

# build
python setup.py sdist
# upload
twine upload ./dist/shutil_extra-x.x.x.tar.gz

Usage

dirtree

from shutil_extra import dirtree

tree_cnf = f'''
folder1
    folder2_1,folder2_2
        folder3_1->folder4
        folder3_2->folder4->folder5_1,folder5_2
        folder3_3->folder4
        folder3_4->folder4
'''

# without post_handle
dirtree.makedirs('./folder_tree', tree_cnf)

# with post_handle
def post_handle(dirname, dirpath):
    # do something after dir generated
    if dirname == 'folder4':
        with open(os.path.join(dirpath, 'data.txt'), 'w') as f:
            f.writelines('hello world')

dirtree.makedirs('./folder_tree', tree_cnf, post_handle=post_handle)

Metadata

Release files for shutil-extra 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shutil-extra 0.0.6
File Size Uploaded
shutil_extra-0.0.6.tar.gz 3.5 kB Details

Release files / shutil_extra-0.0.6.tar.gz

Download URL shutil_extra-0.0.6.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c04eddfb2b38134878146bb681301631eb24b671ce6082dec60e519e2a176ec1
BLAKE2b-256 checksum
How to use checksums
f246f71cf2c82470a282034af1b6084547d115b17dd90c34a4da9026880fae9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

0.0.5

1 release file

0.0.4

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page