wildcard
Project description
wildcard
========
This library is a fork of fnmatch
(https://docs.python.org/2/library/fnmatch.html) to implement \*\*
|PypiDownloads|
All documentation is identical to fnmatch except \* and **, ** and now
\* is \* only affects the particular directory
https://docs.python.org/2/library/fnmatch.html
Install
-------
.. code:: bash
pip install pywildcard
Link pypi: https://pypi.python.org/pypi/pywildcard
Example
-------
.. code:: python
# recommeded check all examples
from basicevents import (subscribe, send_thread, send_queue,
send_blocking, add_subscribe, send)
import pywildcard
dirs = ['hello/world.py', 'hello/world.pyc', 'hello/world/other/folder/example.py']
pywildcard.filter(dirs, 'hello/*')
# ['hello/world.py', 'hello/world.pyc']
pywildcard.filter(dirs, 'hello/*.py')
# ['hello/world.py']
pywildcard.filter(dirs, 'hello/**')
# ['hello/world.py', 'hello/world.pyc', 'hello/world/other/folder/example.py']
pywildcard.filter(dirs, 'hello/**.py')
# ['hello/world.py', 'hello/world/other/folder/example.py']
.. |PypiDownloads| image:: https://img.shields.io/pypi/dm/pywildcard.svg
:target: https://pypi.python.org/pypi/pywildcard
CHANGELOG
=========
1.0.7 (2015-11-25)
------------------
- Add documentation
========
This library is a fork of fnmatch
(https://docs.python.org/2/library/fnmatch.html) to implement \*\*
|PypiDownloads|
All documentation is identical to fnmatch except \* and **, ** and now
\* is \* only affects the particular directory
https://docs.python.org/2/library/fnmatch.html
Install
-------
.. code:: bash
pip install pywildcard
Link pypi: https://pypi.python.org/pypi/pywildcard
Example
-------
.. code:: python
# recommeded check all examples
from basicevents import (subscribe, send_thread, send_queue,
send_blocking, add_subscribe, send)
import pywildcard
dirs = ['hello/world.py', 'hello/world.pyc', 'hello/world/other/folder/example.py']
pywildcard.filter(dirs, 'hello/*')
# ['hello/world.py', 'hello/world.pyc']
pywildcard.filter(dirs, 'hello/*.py')
# ['hello/world.py']
pywildcard.filter(dirs, 'hello/**')
# ['hello/world.py', 'hello/world.pyc', 'hello/world/other/folder/example.py']
pywildcard.filter(dirs, 'hello/**.py')
# ['hello/world.py', 'hello/world/other/folder/example.py']
.. |PypiDownloads| image:: https://img.shields.io/pypi/dm/pywildcard.svg
:target: https://pypi.python.org/pypi/pywildcard
CHANGELOG
=========
1.0.7 (2015-11-25)
------------------
- Add documentation