Python package to patch all the internal functions to ignore .DS_Store file in Mac
Project description
Death to DS_Store
Python package to patch all the internal functions to ignore .DS_Store file in Mac
Free software: MIT license
Documentation: Usage mentioned below
Features
Patches pathlib internal functions to ignore .DS_Store file
Examples
Before
>>> import pathlib
>>> list(pathlib.Path('./tests').iterdir())
[PosixPath('tests/.DS_Store'), PosixPath('tests/__init__.py'), PosixPath('tests/__pycache__'), PosixPath('tests/test_dtd.py'), PosixPath('tests/test_pathlib.py')]
After
>>> import pathlib
>>> import dtd
>>> dtd.patch_all()
>>> list(pathlib.Path('./tests').iterdir())
[PosixPath('tests/__init__.py'), PosixPath('tests/__pycache__'), PosixPath('tests/test_dtd.py'), PosixPath('tests/test_pathlib.py')]
Quick usage by just importing autopatch
>>> import pathlib
>>> from dtd import autopatch
>>> list(pathlib.Path('./tests').iterdir())
[PosixPath('tests/__init__.py'), PosixPath('tests/__pycache__'), PosixPath('tests/test_dtd.py'), PosixPath('tests/test_pathlib.py')]
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-06-27)
First release on PyPI.
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
dtd-0.1.0.tar.gz
(8.4 kB
view hashes)