-
<c       s.  d  Z  d Z d Z d Z e e Z e Z e Z e e Z d Z e d d Z	 d Z
 d Z e e e e Z d	 Z x$ e d
  D] Z e e e  Z q} W[ e Z e Z e Z e Z d   Z d   Z d   Z d   Z d   Z d   Z e d d  Z e Z d d  Z e Z  d   Z! d   Z" d   Z# d   Z$ d   Z% e& Z' e( Z) e* Z+ e, d	  Z- d   Z. d d  Z/ d d  Z0 d   Z1 d   Z2 d    Z3 d!   Z4 d" d#  Z5 d	 d$  Z6 d%   Z7 e d&  Z8 e a9 d'   Z: d d(  Z; y- d) k< l: Z: l Z l Z l Z e e Z Wn e= j
 o n Xd* S(+   s  A collection of string operations (most are no longer used in Python 1.6).

Warning: most of the code you see here isn't normally used nowadays.  With
Python 1.6, many of these functions are implemented as methods on the
standard string object. They used to be implemented by a built-in module
called strop, but strop is now obsolete itself.

Public module variables:

whitespace -- a string containing all characters considered whitespace
lowercase -- a string containing all characters considered lowercase letters
uppercase -- a string containing all characters considered uppercase letters
letters -- a string containing all characters considered letters
digits -- a string containing all characters considered decimal digits
hexdigits -- a string containing all characters considered hexadecimal digits
octdigits -- a string containing all characters considered octal digits
punctuation -- a string containing all characters considered punctuation
printable -- a string containing all characters considered printable

s    	
s   abcdefghijklmnopqrstuvwxyzs   ABCDEFGHIJKLMNOPQRSTUVWXYZs
   0123456789s   abcdefs   ABCDEFs   01234567s    !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~s    i   c    s   |  i   Sd S(   sS   lower(s) -> string

    Return a copy of the string s converted to lowercase.

    N(   s   ss   lower(   s   s(    (    s   /usr/lib/python2.2/string.pys   lower0 s     c    s   |  i   Sd S(   sS   upper(s) -> string

    Return a copy of the string s converted to uppercase.

    N(   s   ss   upper(   s   s(    (    s   /usr/lib/python2.2/string.pys   upper9 s     c    s   |  i   Sd S(   s   swapcase(s) -> string

    Return a copy of the string s with upper case characters
    converted to lowercase and vice versa.

    N(   s   ss   swapcase(   s   s(    (    s   /usr/lib/python2.2/string.pys   swapcaseB s     c    s   |  i   Sd S(   sm   strip(s) -> string

    Return a copy of the string s with leading and trailing
    whitespace removed.

    N(   s   ss   strip(   s   s(    (    s   /usr/lib/python2.2/string.pys   stripL s     c    s   |  i   Sd S(   s]   lstrip(s) -> string

    Return a copy of the string s with leading whitespace removed.

    N(   s   ss   lstrip(   s   s(    (    s   /usr/lib/python2.2/string.pys   lstripV s     c    s   |  i   Sd S(   sb   rstrip(s) -> string

    Return a copy of the string s with trailing whitespace
    removed.

    N(   s   ss   rstrip(   s   s(    (    s   /usr/lib/python2.2/string.pys   rstrip_ s     ic    s   |  i | |  Sd S(   sg  split(s [,sep [,maxsplit]]) -> list of strings

    Return a list of the words in the string s, using sep as the
    delimiter string.  If maxsplit is given, splits at no more than
    maxsplit places (resulting in at most maxsplit+1 words).  If sep
    is not specified, any whitespace string is a separator.

    (split and splitfields are synonymous)

    N(   s   ss   splits   seps   maxsplit(   s   ss   seps   maxsplit(    (    s   /usr/lib/python2.2/string.pys   splitj s    
 s    c    s   | i |   Sd S(   s   join(list [,sep]) -> string

    Return a string composed of the words in list, with
    intervening occurrences of sep.  The default separator is a
    single space.

    (joinfields and join are synonymous)

    N(   s   seps   joins   words(   s   wordss   sep(    (    s   /usr/lib/python2.2/string.pys   joiny s    	 c    s   |  i |   Sd S(   sp   index(s, sub [,start [,end]]) -> int

    Like find but raises ValueError when the substring is not found.

    N(   s   ss   indexs   args(   s   ss   args(    (    s   /usr/lib/python2.2/string.pys   index s     c    s   |  i |   Sd S(   sr   rindex(s, sub [,start [,end]]) -> int

    Like rfind but raises ValueError when the substring is not found.

    N(   s   ss   rindexs   args(   s   ss   args(    (    s   /usr/lib/python2.2/string.pys   rindex s     c    s   |  i |   Sd S(   s   count(s, sub[, start[,end]]) -> int

    Return the number of occurrences of substring sub in string
    s[start:end].  Optional arguments start and end are
    interpreted as in slice notation.

    N(   s   ss   counts   args(   s   ss   args(    (    s   /usr/lib/python2.2/string.pys   count s     c    s   |  i |   Sd S(   s  find(s, sub [,start [,end]]) -> in

    Return the lowest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.

    Return -1 on failure.

    N(   s   ss   finds   args(   s   ss   args(    (    s   /usr/lib/python2.2/string.pys   find s    	 c    s   |  i |   Sd S(   s  rfind(s, sub [,start [,end]]) -> int

    Return the highest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.

    Return -1 on failure.

    N(   s   ss   rfinds   args(   s   ss   args(    (    s   /usr/lib/python2.2/string.pys   rfind s    	 c    s   t  |   Sd S(   sY   atof(s) -> float

    Return the floating point number represented by the string s.

    N(   s   _floats   s(   s   s(    (    s   /usr/lib/python2.2/string.pys   atof s     i
   c    s   t  |  |  Sd S(   ss  atoi(s [,base]) -> int

    Return the integer represented by the string s in the given
    base, which defaults to 10.  The string s must consist of one
    or more digits, possibly preceded by a sign.  If base is 0, it
    is chosen from the leading characters of s, 0 for octal, 0x or
    0X for hexadecimal.  If base is 16, a preceding 0x or 0X is
    accepted.

    N(   s   _ints   ss   base(   s   ss   base(    (    s   /usr/lib/python2.2/string.pys   atoi s    
 c    s   t  |  |  Sd S(   s  atol(s [,base]) -> long

    Return the long integer represented by the string s in the
    given base, which defaults to 10.  The string s must consist
    of one or more digits, possibly preceded by a sign.  If base
    is 0, it is chosen from the leading characters of s, 0 for
    octal, 0x or 0X for hexadecimal.  If base is 16, a preceding
    0x or 0X is accepted.  A trailing L or l is not accepted,
    unless base is 0.

    N(   s   _longs   ss   base(   s   ss   base(    (    s   /usr/lib/python2.2/string.pys   atol s     c    s   |  i |  Sd S(   s   ljust(s, width) -> string

    Return a left-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.

    N(   s   ss   ljusts   width(   s   ss   width(    (    s   /usr/lib/python2.2/string.pys   ljust s     c    s   |  i |  Sd S(   s   rjust(s, width) -> string

    Return a right-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.

    N(   s   ss   rjusts   width(   s   ss   width(    (    s   /usr/lib/python2.2/string.pys   rjust s     c    s   |  i |  Sd S(   s   center(s, width) -> string

    Return a center version of s, in a field of the specified
    width. padded with spaces as needed.  The string is never
    truncated.

    N(   s   ss   centers   width(   s   ss   width(    (    s   /usr/lib/python2.2/string.pys   centers     c    s   t  |   t  d  j o
 |  } n |  } t |  } | | j o | Sn d } | d d d f j o | d | d f \ } } n | d | | | Sd S(   s   zfill(x, width) -> string

    Pad a numeric string x with zeros on the left, to fill a field
    of the specified width.  The string x is never truncated.

    s    i    s   -s   +i   s   0N(   s   types   xs   ss   lens   ns   widths   sign(   s   xs   widths   ss   signs   n(    (    s   /usr/lib/python2.2/string.pys   zfills      
 i   c    s   |  i |  Sd S(   s   expandtabs(s [,tabsize]) -> string

    Return a copy of the string s with all tab characters replaced
    by the appropriate number of spaces, depending on the current
    column, and the tabsize (default 8).

    N(   s   ss
   expandtabss   tabsize(   s   ss   tabsize(    (    s   /usr/lib/python2.2/string.pys
   expandtabs"s     c    s4   | o |  i | |  Sn |  i | |  d   Sd S(   sg  translate(s,table [,deletions]) -> string

    Return a copy of the string s, where all characters occurring
    in the optional argument deletions are removed, and the
    remaining characters have been mapped through the given
    translation table, which must be a string of length 256.  The
    deletions argument is not allowed for Unicode strings.

    i    N(   s	   deletionss   ss	   translates   table(   s   ss   tables	   deletions(    (    s   /usr/lib/python2.2/string.pys	   translate-s    	 c    s   |  i   Sd S(   so   capitalize(s) -> string

    Return a copy of the string s with only its first character
    capitalized.

    N(   s   ss
   capitalize(   s   s(    (    s   /usr/lib/python2.2/string.pys
   capitalize@s     c    s*   t  t t |  i |   | p d  Sd S(   s   capwords(s, [sep]) -> string

    Split the argument into words using split, capitalize each
    word using capitalize, and join the capitalized words using
    join. Note that this replaces runs of whitespace characters by
    a single space.

    s    N(   s   joins   maps
   capitalizes   ss   splits   sep(   s   ss   sep(    (    s   /usr/lib/python2.2/string.pys   capwordsKs     c    s   t  |   t  |  j o t d  n t o t t t  a n t } t t	 |   }  x, t
 t  |    D] } | | | |  | <qj Wt | d  Sd S(   s   maketrans(frm, to) -> string

    Return a translation table (a string of 256 bytes long)
    suitable for use in string.translate.  The strings frm and to
    must be of the same length.

    s)   maketrans arguments must have same lengths    N(   s   lens   fromstrs   tostrs
   ValueErrors   _idmapLs   maps   Nones   _idmaps   Ls   ords   ranges   is   join(   s   fromstrs   tostrs   is   L(    (    s   /usr/lib/python2.2/string.pys	   maketransXs       c    s   |  i | | |  Sd S(   s   replace (str, old, new[, maxsplit]) -> string

    Return a copy of string str with all occurrences of substring
    old replaced by new. If the optional argument maxsplit is
    given, only the first maxsplit occurrences are replaced.

    N(   s   ss   replaces   olds   news   maxsplit(   s   ss   olds   news   maxsplit(    (    s   /usr/lib/python2.2/string.pys   replacels     (   s	   maketranss	   lowercases	   uppercases
   whitespaceN(>   s   __doc__s
   whitespaces	   lowercases	   uppercases   letterss   ascii_lowercases   ascii_uppercases   ascii_letterss   digitss	   hexdigitss	   octdigitss   punctuations	   printables   _idmaps   ranges   is   chrs
   ValueErrors   index_errors
   atoi_errors
   atof_errors
   atol_errors   lowers   uppers   swapcases   strips   lstrips   rstrips   Nones   splits   splitfieldss   joins
   joinfieldss   indexs   rindexs   counts   finds   rfinds   floats   _floats   ints   _ints   longs   _longs   types   _StringTypes   atofs   atois   atols   ljusts   rjusts   centers   zfills
   expandtabss	   translates
   capitalizes   capwordss   _idmapLs	   maketranss   replaces   strops   ImportError(2   s   ascii_lowercases   uppers
   atol_errors   letterss	   uppercases   ascii_letterss   replaces   capwordss   index_errors
   expandtabss   strips   ascii_uppercases	   octdigitss   indexs   _StringTypes
   whitespaces   _ints   rindexs   _floats   punctuations   finds   lstrips   splitfieldss   splits   rstrips	   translates   ljusts   digitss
   joinfieldss   rjusts	   printables   swapcases
   atof_errors   atois	   hexdigitss   atols   atofs	   lowercases   counts   lowers   joins   centers   is   _longs   rfinds
   atoi_errors	   maketranss
   capitalizes   zfills   _idmap(    (    s   /usr/lib/python2.2/string.pys   ? sv   

  					
	
											
						