{
    "mode": "pydoc",
    "parameter": "fnmatch",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/pydoc/fnmatch/json",
    "generated": "2026-06-02T16:00:28Z",
    "sections": {
        "NAME": {
            "content": "fnmatch - Filename matching with shell patterns.\n",
            "subsections": []
        },
        "MODULE REFERENCE": {
            "content": "https://docs.python.org/3.10/library/fnmatch.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "",
            "subsections": [
                {
                    "name": "fnmatch",
                    "content": ""
                },
                {
                    "name": "fnmatchcase",
                    "content": "The functions operate by translating the pattern into a regular\nexpression.  They cache the compiled regular expressions for speed.\n\nThe function translate(PATTERN) returns a regular expression\ncorresponding to PATTERN.  (It does not compile it.)\n"
                }
            ]
        },
        "FUNCTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "filter",
                    "content": "Construct a list from those elements of the iterable NAMES that match PAT.\n"
                },
                {
                    "name": "fnmatch",
                    "content": "Test whether FILENAME matches PATTERN.\n\nPatterns are Unix shell style:\n\n*       matches everything\n?       matches any single character\n[seq]   matches any character in seq\n[!seq]  matches any char not in seq\n\nAn initial period in FILENAME is not special.\nBoth FILENAME and PATTERN are first case-normalized\nif the operating system requires it.\nIf you don't want this, use fnmatchcase(FILENAME, PATTERN).\n"
                },
                {
                    "name": "fnmatchcase",
                    "content": "Test whether FILENAME matches PATTERN, including case.\n\nThis is a version of fnmatch() which doesn't case-normalize\nits arguments.\n"
                },
                {
                    "name": "translate",
                    "content": "Translate a shell PATTERN to a regular expression.\n\nThere is no way to quote meta-characters.\n"
                }
            ]
        },
        "DATA": {
            "content": "all = ['filter', 'fnmatch', 'fnmatchcase', 'translate']\n",
            "subsections": []
        },
        "FILE": {
            "content": "/usr/lib/python3.10/fnmatch.py\n\n",
            "subsections": []
        }
    },
    "summary": "fnmatch - Filename matching with shell patterns.",
    "flags": [],
    "examples": [],
    "see_also": []
}