Skip to main content

wildcard

Project description

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 * , * is now ** and * only affects the particular directory

https://docs.python.org/2/library/fnmatch.html

Install

pip install pywildcard

Link pypi: https://pypi.python.org/pypi/pywildcard

Example

# 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']

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

pywildcard-1.0.7-1.tar.gz (3.3 kB view hashes)

Uploaded Source

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