Skip to main content

Python package to patch all the internal functions to ignore .DS_Store file in Mac

Project description

Death to DS_Store

https://img.shields.io/pypi/v/dtd.svg https://img.shields.io/travis/muditbac/dtd.svg Documentation Status

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


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)

Uploaded Source

Built Distribution

dtd-0.1.0-py2.py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page