KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/22697/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/22697/root/usr/lib64/python2.4/ConfigParser.pyo
mò
‚=5Dc
@sgdZdkZdddddddd	d
ddd
dg
ZdZdZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZ	defd„ƒYZ
de
fd„ƒYZde
fd„ƒYZde
fd„ƒYZ
defd„ƒYZd	efd„ƒYZdfd„ƒYZd
efd„ƒYZdefd„ƒYZdS( sConfiguration file parser.

A setup file consists of sections, lead by a "[section]" header,
and followed by "name: value" entries, with continuations and such in
the style of RFC 822.

The option values can contain format strings which refer to other values in
the same section, or values in a special [DEFAULT] section.

For example:

    something: %(dir)s/whatever

would resolve the "%(dir)s" to the value of dir.  All reference
expansions are done late, on demand.

Intrinsic defaults can be specified by passing them into the
ConfigParser constructor as a dictionary.

class:

ConfigParser -- responsible for parsing a list of
                configuration files, and managing the parsed database.

    methods:

    __init__(defaults=None)
        create the parser and specify a dictionary of intrinsic defaults.  The
        keys must be strings, the values must be appropriate for %()s string
        interpolation.  Note that `__name__' is always an intrinsic default;
        its value is the section's name.

    sections()
        return all the configuration section names, sans DEFAULT

    has_section(section)
        return whether the given section exists

    has_option(section, option)
        return whether the given option exists in the given section

    options(section)
        return list of configuration options for the named section

    read(filenames)
        read and parse the list of named configuration files, given by
        name.  A single filename is also allowed.  Non-existing files
        are ignored.  Return list of successfully read files.

    readfp(fp, filename=None)
        read and parse one configuration file, given as a file object.
        The filename defaults to fp.name; it is only used in error
        messages (if fp has no `name' attribute, the string `<???>' is used).

    get(section, option, raw=False, vars=None)
        return a string value for the named option.  All % interpolations are
        expanded in the return values, based on the defaults passed into the
        constructor and the DEFAULT section.  Additional substitutions may be
        provided using the `vars' argument, which must be a dictionary whose
        contents override any pre-existing defaults.

    getint(section, options)
        like get(), but convert value to an integer

    getfloat(section, options)
        like get(), but convert value to a float

    getboolean(section, options)
        like get(), but convert value to a boolean (currently case
        insensitively defined as 0, false, no, off for False, and 1, true,
        yes, on for True).  Returns False or True.

    items(section, raw=False, vars=None)
        return a list of tuples with (name, value) for each option
        in the section.

    remove_section(section)
        remove the given file section and all its options

    remove_option(section, option)
        remove the given option from the given section

    set(section, option, value)
        set the given option

    write(fp)
        write the configuration state in .ini format
NtNoSectionErrortDuplicateSectionErrort
NoOptionErrortInterpolationErrortInterpolationDepthErrortInterpolationSyntaxErrortParsingErrortMissingSectionHeaderErrortConfigParsertSafeConfigParsertRawConfigParsertDEFAULTSECTtMAX_INTERPOLATION_DEPTHtDEFAULTi
tErrorcBs)tZdZdd„Zd„ZeZRS(s'Base class for ConfigParser exceptions.tcCs||_ti||ƒdS(N(tmsgtselftmessaget	Exceptiont__init__(RR((t$/usr/lib64/python2.4/ConfigParser.pyRms	cCs|iS(N(RR(R((Rt__repr__qs(t__name__t
__module__t__doc__RRt__str__(((RRjs	cBstZdZd„ZRS(s2Raised when no section matches a requested option.cCs$ti|d|fƒ||_dS(NsNo section: %r(RRRtsection(RR((RRys(RRRR(((RRvscBstZdZd„ZRS(s*Raised when a section is multiply-created.cCs!ti|d|ƒ||_dS(NsSection %r already exists(RRRR(RR((RR€s(RRRR(((RR}scBstZdZd„ZRS(s!A requested option was not found.cCs0ti|d||fƒ||_||_dS(NsNo option %r in section: %r(RRRtoptionR(RRR((RR‡s	(RRRR(((RR„scBstZdZd„ZRS(s0Base class for interpolation-related exceptions.cCs&ti||ƒ||_||_dS(N(RRRRRR(RRRR((RRs	(RRRR(((RRstInterpolationMissingOptionErrorcBstZdZd„ZRS(sAA string substitution required a setting which was not available.cCs9d||||f}ti||||ƒ||_dS(NsNBad value substitution:
	section: [%s]
	option : %s
	key    : %s
	rawval : %s
(RRt	referencetrawvalRRRR(RRRRRR((RR˜s(RRRR(((RR•scBstZdZRS(sjRaised when the source text into which substitutions are made
    does not conform to the required syntax.(RRR(((RR¢scBstZdZd„ZRS(s0Raised when substitutions are nested too deeply.cCs-d|||f}ti||||ƒdS(NsSValue interpolation too deeply recursive:
	section: [%s]
	option : %s
	rawval : %s
(RRRRRRR(RRRRR((RR©s(RRRR(((RR¦scBs tZdZd„Zd„ZRS(s>Raised when a configuration file does not follow legal syntax.cCs*ti|d|ƒ||_g|_dS(Ns File contains parsing errors: %s(RRRtfilenameterrors(RR ((RR´s	cCs3|ii||fƒ|id||f7_dS(Ns
	[line %2d]: %s(RR!tappendtlinenotlineR(RR#R$((RR"¹s(RRRRR"(((RR±s	cBstZdZd„ZRS(s@Raised when a key-value pair is found before any section header.cCs<ti|d|||fƒ||_||_||_dS(Ns7File contains no section headers.
file: %s, line: %d
%r(RRRR R#R$(RR R#R$((RRÀs
			(RRRR(((RR½scBs7tZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z	dd„Z
d	„Zd
„Zd„Z
d„Zd
„Zhde<de<de<de<de<de<de<de<Zd„Zd„Zd„Zd„Zd„Zd„Zd„ZeidƒZeidƒZd„ZRS( NcCsTh|_h|_|o7x4|iƒD]"\}}||i|i|ƒ<q&WndS(N(Rt	_sectionst	_defaultstdefaultstitemstkeytvaluetoptionxform(RR'R*R)((RRÌs		
cCs|iS(N(RR&(R((RR'ÓscCs
|iiƒS(s3Return a list of section names, excluding [DEFAULT]N(RR%tkeys(R((RtsectionsÖscCs1||ijot|ƒ‚nh|i|<dS(s“Create a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists.
        N(RRR%R(RR((Rtadd_sectionÛscCs
||ijS(s~Indicate whether the named section is present in the configuration.

        The DEFAULT section is not acknowledged.
        N(RRR%(RR((Rthas_sectionåscCsky|i|iƒ}Wntj
ot|ƒ‚nX|i|iƒd|jo|d=n|i	ƒS(s9Return a list of option names for the given section name.RN(
RR%RtcopytoptstKeyErrorRtupdateR&R,(RRR1((Rtoptionsìs
cCsˆt|tƒo
|g}ng}x^|D]V}yt|ƒ}Wntj
o
q*nX|i	||ƒ|i
ƒ|i|ƒq*W|S(sÔRead and parse a filename or a list of filenames.

        Files that cannot be opened are silently ignored; this is
        designed so that you can specify a list of potential
        configuration file locations (e.g. current directory, user's
        home directory, systemwide directory), and all existing
        configuration files in the list will be read.  A single
        filename may also be given.

        Return list of successfully read files.
        N(t
isinstancet	filenamest
basestringtread_okR topentfptIOErrorRt_readtcloseR"(RR6R:R R8((Rtread÷s

cCsN|djo-y
|i}Wq:tj
o
d}q:Xn|i||ƒdS(sLike read() but the argument must be a file-like object.

        The `fp' argument must have a `readline' method.  Optional
        second argument is the `filename', which if not given, is
        taken from fp.name.  If fp has no `name' attribute, `<???>' is
        used.

        s<???>N(R tNoneR:tnametAttributeErrorRR<(RR:R ((Rtreadfps

cCsÇ|i|ƒ}||ijoO|tjot|ƒ‚n||ijo|i|SqÃt	||ƒ‚nV||i|jo|i||Sn/||ijo|i|Snt	||ƒ‚dS(N(
RR+RtoptRR%RRR&R(RRRRC((Rtget s
cCsˆy|i|}Wn6tj
o*|tjot|ƒ‚nh}nX|iiƒ}|i
|ƒd|jo|d=n|iƒS(NR(RR%Rtd2R2RRR&R0tdR3R((RRRERF((RR(0s


cCs||i||ƒƒS(N(tconvRRDRR(RRRGR((Rt_get=scCs|i|t|ƒS(N(RRHRtintR(RRR((Rtgetint@scCs|i|t|ƒS(N(RRHRtfloatR(RRR((RtgetfloatCst1tyesttruetont0tnotfalsetoffcCsJ|i||ƒ}|iƒ|ijotd|‚n|i|iƒS(NsNot a boolean: %s(RRDRRtvtlowert_boolean_statest
ValueError(RRRRU((Rt
getbooleanIscCs
|iƒS(N(t	optionstrRV(RRZ((RR+OscCs|p
|tjo |i|ƒ}||ijSnI||ijotSn1|i|ƒ}||i|jp
||ijSdS(s=Check for the existence of a given option in a given section.N(RRRR+RR&R%tFalse(RRR((Rt
has_optionRscCsl|p
|tjo
|i}n4y|i|}Wntj
ot|ƒ‚nX|||i	|ƒ<dS(sSet an option.N(RRRR&tsectdictR%R2RR*R+R(RRRR*R]((Rtset^s
cCs	|iok|idtƒxF|iiƒD]5\}}|id|t|ƒi	ddƒfƒq+W|idƒnx|i
D]‚}|id|ƒx[|i
|iƒD]F\}}|djo-|id|t|ƒi	ddƒfƒqªqªW|idƒqWdS(s?Write an .ini-format representation of the configuration state.s[%s]
s%s = %s
s
s
	RN(RR&R:twriteRR(R)R*tstrtreplaceR%R(RR:R*R)R((RR_is
-

1cCs†|p
|tjo
|i}n4y|i|}Wntj
ot|ƒ‚nX|i|ƒ}||j}|o||=n|S(sRemove an option.N(RRRR&R]R%R2RR+Rtexisted(RRRRbR]((Rt
remove_optionxs
cCs(||ij}|o|i|=n|S(sRemove a file section.N(RRR%Rb(RRRb((Rtremove_section‡s
s\[(?P<header>[^]]+)\]s9(?P<option>[^:=\s][^:=]*)\s*(?P<vi>[:=])\s*(?P<value>.*)$cCsÏd}d}d}
d}xŸto—|iƒ}|pPn|
d}
|i	ƒdjp|ddjoqn|i
ddƒdiƒdjo|ddjoqn|diƒoG|dj	o:|o3|i	ƒ}|od|||f||<qµq|ii|ƒ}|op|idƒ}||ijo|i|}n7|tjo
|i}nhd	|<}||i|<d}q|djot||
|ƒ‚q|ii|ƒ}|oÁ|id
ddƒ\}}}
|djoPd|
joC|
idƒ}	|	djo#|
|	diƒo|
|	 }
qBn|
i	ƒ}
|
djo
d}
n|i|iƒƒ}|
||<q|pt |ƒ}n|i!|
t"|ƒƒqW|o
|‚ndS(s®Parse a sectioned setup file.

        The sections in setup file contains a title line at the top,
        indicated by a name in square brackets (`[]'), plus key/value
        options lines, indicated by `name: value' format lines.
        Continuations are represented by an embedded newline then
        leading whitespace.  Blank lines, lines beginning with a '#',
        and just about everything else are ignored.
        iiRs#;tremtrRs%s
%stheaderRRtviR*t=t:t;iÿÿÿÿs""N(RiRj(#R?tcursecttoptnameR#tetTrueR:treadlineR$tstriptsplitRVtisspaceR*RtSECTCREtmatchtmotgrouptsectnameR%RR&RtfpnametOPTCRERhtoptvaltfindtposR+trstripRR"trepr(RR:RyRlRnRmRxRhR*R}R#R$RvR{((RR<Ÿs`	
$4% 




"

(RRR?RR'R-R.R/R4R>RBRDR(RHRJRLRoR[RWRYR+R\R^R_RcRdtretcompileRtRzR<(((RR
Ës0			
					
			N							
	cBsGtZedd„Zedd„Zd„ZeidƒZ	d„Z
RS(NcCs|iiƒ}y|i|i|ƒWn0tj
o$|tjot	|ƒ‚qZnX|o4x1|iƒD]\}}|||i|ƒ<qnWn|i|ƒ}y||}Wn"tj
ot||ƒ‚nX|o|Sn|i||||ƒSdS(s®Get an option value for a given section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw' is true.  Additional substitutions may be provided using the
        `vars' argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        N(RR&R0RFR3R%RR2RRtvarsR(R)R*R+RRtrawt_interpolate(RRRRƒR‚RFR*R)((RRDïs&


c
	Cs2|iiƒ}y|i|i|ƒWn0tj
o$|tjot	|ƒ‚qZnX|o4x1|iƒD]\}	}|||i|	ƒ<qnWn|iƒ}d|jo|idƒn|o-g}|D]}||||fqÑ~Sn<g}|D])}|||i|||||ƒfqþ~SdS(sØReturn a list of tuples with (name, value) for each option
        in the section.

        All % interpolations are expanded in the return values, based on the
        defaults passed into the constructor, unless the optional argument
        `raw' is true.  Additional substitutions may be provided using the
        `vars' argument, which must be a dictionary whose contents overrides
        any pre-existing defaults.

        The section DEFAULT is special.
        RN(RR&R0RFR3R%RR2RRR‚R(R)R*R+R,R4tremoveRƒt_[1]RR„(
RRRƒR‚RFRR*R4R†R)((RR(s"


-cCsµ|}t}x|ow|d8}d|jo[|ii|i|ƒ}y||}Wq‰t	j
o"}t||||dƒ‚q‰XqPqWd|jot|||ƒ‚n|S(Nis%(i(RR*RtdepthRt_KEYCREtsubt_interpolation_replaceR‚R2RnRRRR(RRRRR‚RnR*R‡((RR„/s

"
s%\(([^)]*)\)s|.cCs?|idƒ}|djo|iƒSnd|i|ƒSdS(Nis%%(%s)s(RuRwtsR?RR+(RRuR‹((RRŠDs
(RRR[R?RDR(R„R€RRˆRŠ(((RRís
  	cBs5tZd„ZeidƒiZd„Zd„ZRS(NcCs/g}|i|||||dƒdi|ƒS(NiR(tLRt_interpolate_someRRRR‚tjoin(RRRRR‚RŒ((RR„Nss
%\(([^)]+)\)scCsÇ|tjot|||ƒ‚nx|o•|idƒ}
|
djo|i	|ƒdSn|
djo|i	||
 ƒ||
}n|dd!}	|	djo|i	dƒ|d}q&|	djoÙ|i|ƒ}|djot||d|ƒ‚n|i|idƒƒ}||iƒ}y||}Wn(tj
ot||||ƒ‚nXd|jo$|i||||||dƒq¾|i	|ƒq&t||d|fƒ‚q&WdS(Nt%iiit(s'bad interpolation variable reference %rs/'%%' must be followed by '%%' or '(', found: %r(R‡RRRRtrestR|tptaccumR"tcRt_interpvar_matchtmR?RR+RwtvartendtmapRUR2RR(RRR“R‘RR™R‡R—R–R”R’RU((RRVs@








	
	cCs:t|tƒptdƒ‚nti||||ƒdS(sASet an option.  Extend ConfigParser.set: check for string values.soption values must be stringsN(	R5R*R7t	TypeErrorRR^RRR(RRRR*((RR^|s(	RRR„R€RRuR•RR^(((RR	Ls		&(RR€t__all__RRRRRRRRRRRRRR
RR	(R	RR›RRRRRRR€R
RRRRRR((Rt?Xs$	-	
ÿ#_

Anon7 - 2021