-ķ
ē¶<c       sL   d  Z  d k Z d d d g Z h  Z d   Z d   Z d   Z d   Z d S(	   s£  Filename matching with shell patterns.

fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.

The functions operate by translating the pattern into a regular
expression.  They cache the compiled regular expressions for speed.

The function translate(PATTERN) returns a regular expression
corresponding to PATTERN.  (It does not compile it.)
Ns   fnmatchs   fnmatchcases	   translatec    s>   d k  } | i i |   }  | i i |  } t |  |  Sd S(   s½  Test whether FILENAME matches PATTERN.

    Patterns are Unix shell style:

    *       matches everything
    ?       matches any single character
    [seq]   matches any character in seq
    [!seq]  matches any char not in seq

    An initial period in FILENAME is not special.
    Both FILENAME and PATTERN are first case-normalized
    if the operating system requires it.
    If you don't want this, use fnmatchcase(FILENAME, PATTERN).
    N(   s   oss   paths   normcases   names   pats   fnmatchcase(   s   names   pats   os(    (    s   /usr/lib/python2.2/fnmatch.pys   fnmatch s
     	c    sń   d k  } d k } g  } | i i |  } t i |  o# t |  } t
 i |  t | <n t | i } | i | j o3 x, |  D]$ } | |  o | i |  n q Wn< x8 |  D]0 } | | i i |   o | i |  n qµ W| Sd S(   s2   Return the subset of the list NAMES that match PATN(   s   oss	   posixpaths   results   paths   normcases   pats   _caches   has_keys	   translates   ress   res   compiles   matchs   namess   names   append(   s   namess   pats	   posixpaths   ress   results   oss   matchs   name(    (    s   /usr/lib/python2.2/fnmatch.pys   filter( s$       c    sO   t  i |  o# t |  } t i |  t  | <n t  | i |   t	 j	 Sd S(   s   Test whether FILENAME matches PATTERN, including case.

    This is a version of fnmatch() which doesn't case-normalize
    its arguments.
    N(
   s   _caches   has_keys   pats	   translates   ress   res   compiles   matchs   names   None(   s   names   pats   res(    (    s   /usr/lib/python2.2/fnmatch.pys   fnmatchcase< s
     c    sĖ  d t  |   f \ } } d } x| | j  o|  | } | d } | d j o | d } n^| d j o | d } nC| d j o"| } | | j  o |  | d	 j o | d } n | | j  o |  | d
 j o | d } n x- | | j  o |  | d
 j o | d } qę W| | j o | d } nv |  | | !i d d  } | d } | d d	 j o d | d } n  | d d j o d | } n d | | f } n | t	 i
 |  } q! W| d Sd S(   sf   Translate a shell PATTERN to a regular expression.

    There is no way to quote meta-characters.
    i    s    i   s   *s   .*s   ?s   .s   [s   !s   ]s   \[s   \s   \\s   ^s   %s[%s]s   $N(   s   lens   pats   is   ns   ress   cs   js   replaces   stuffs   res   escape(   s   pats   cs   stuffs   is   ress   js   n(    (    s   /usr/lib/python2.2/fnmatch.pys	   translateH s>      

 
(   s   __doc__s   res   __all__s   _caches   fnmatchs   filters   fnmatchcases	   translate(   s   filters   res   fnmatchcases   __all__s   fnmatchs   _caches	   translate(    (    s   /usr/lib/python2.2/fnmatch.pys   ? s   				