https://github.com/codeskyblue/pyignore
https://github.com/codeskyblue/pyignore
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codeskyblue/pyignore
- Owner: codeskyblue
- License: mit
- Created: 2014-10-24T10:57:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-24T11:00:59.000Z (over 10 years ago)
- Last Synced: 2025-02-28T19:19:53.069Z (3 months ago)
- Language: Python
- Size: 113 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
pyignore
==========================Parse file like `.gitignore`.
I write this because, there are no good ignore parsers lib for python.## Usage
ign = Ignore(['foo/', '/*/*.pyc', '*.txt'])
print ign
names = ['/log/foo/', '/foo', '/bar/', '/x.pyc', '/foo/a.pyc', '/foo/a.py', '/foo/a.txt']
print 'names', names
print ign.exclude(names)
print ign.filter(names)Licence under [MIT](LICENSE)