™N
åu¦9c       sF     d  Z    k Z  h  Z  d „  Z & d „  Z 2 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.)
c    sM     ! 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   oss+   /usr/lib/python1.5/site-packages/fnmatch.pys   fnmatch s
   	c    sa   & + - t  i | ƒ o) . t | ƒ } / t i | ƒ t  | <n 0 t  | i |  ƒ t	 j	 Sd S(   s†   Test wheter 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   ress+   /usr/lib/python1.5/site-packages/fnmatch.pys   fnmatchcase& s
   c    sd  2 6 8 d t  |  ƒ f \ } } 9 d } : x%: | | j  o; |  | } < | d } = | d j o > | d } nÖ? | d j o @ | d } nµA | d j oŽB | } C | | j  o |  | d	 j o D | d } n E | | j  o |  | d
 j o F | d } n G x3 G | | j  o |  | d
 j o H | d } qWI | | j o J | d } nÄ L |  | | !} M | d } N | d d	 j o O d | d d
 } nm P | d t  | ƒ j o Q d } nF S x. S | d d j o T | d | d } qêWU d | d
 } V | | } n X | t i	 | ƒ } q0 WY | d Sd S(   sa   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   $N(
   s   lens   pats   is   ns   ress   cs   js   stuffs   res   escape(   s   pats   is   ns   ress   cs   js   stuffs+   /usr/lib/python1.5/site-packages/fnmatch.pys	   translate2 sF   	 	!! ! N(   s   __doc__s   res   _caches   fnmatchs   fnmatchcases	   translate(    s+   /usr/lib/python1.5/site-packages/fnmatch.pys   ? s
   		