Created
June 13, 2017 16:52
-
-
Save jeff-minard-ck/6dd686811e8514a57dd219f292b97f67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import fnmatch | |
>>> a = '/var/lib/docker/place/thing.sh' | |
>>> fnmatch.fnmatch(a, '/var/*') | |
True | |
>>> fnmatch.fnmatch(a, '/var/*/thing.sh') | |
True | |
>>> fnmatch.fnmatch(a, '/var/lib/docker/place/subplace/../thing.sh') | |
False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment