Skip to main content

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

Project details


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