-í
ç¶<c       sg     d  Z    d k Z  d d d g Z  h  Z  d „  Z ( d „  Z < d „  Z H 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    sP    ! # 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 0 t | i } 1 | i | j o? 3 x5 |  D3 ]* } 4 | | ƒ o 5 | i | ƒ n q£ WnH 7 xA |  D7 ]6 } 8 | | i i | ƒ ƒ o 9 | 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    sa   < A C t  i | ƒ o) D t | ƒ } E t i | ƒ t  | <n F 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+  H L N d t  |  ƒ f \ } } O d } P xìP | | j  oÛQ |  | } R | d } S | d j o T | d } nU | d j o V | d } n|W | d j oUX | } Y | | j  o |  | d	 j o Z | d } n [ | | j  o |  | d
 j o \ | d } n ] x3 ] | | j  o |  | d
 j o ^ | d } qW_ | | j o ` | d } n‹ b |  | | !i d d ƒ } c | d } d | d d	 j o e d | d } n& f | d d j o g d | } n h d | | f } n j | t	 i
 | ƒ } q0 Wk | 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   	