An open API service indexing awesome lists of open source software.

https://github.com/codeskyblue/pyignore


https://github.com/codeskyblue/pyignore

Last synced: about 2 months ago
JSON representation

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)