wildcard
Project description
This library is a fork of fnmatch (https://docs.python.org/2/library/fnmatch.html) to implement **
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 details)
File details
Details for the file pywildcard-1.0.7-1.tar.gz
.
File metadata
- Download URL: pywildcard-1.0.7-1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da400f0a6cccf13efa9bba620ca4053d4ee22ff60e177f6db6ab73801a7c2fcd |
|
MD5 | 695c7b71de37b70726bd15ba40e7bc06 |
|
BLAKE2b-256 | 5300a61b41c5ccb658aa49944b9d5191dce6147b5e26ede49aa69924c7b48d8b |