403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/iniparse/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/iniparse/compat.pyc
Ñò
Á¡Ic@sÖdZddkZddklZlZlZlZlZlZl	Z	l
Z
ddklZlZl
Z
lZddkZdefd„ƒYZdefd„ƒYZd	efd
„ƒYZdefd„ƒYZdS(
s(Compatibility interfaces for ConfigParser

Interfaces of ConfigParser, RawConfigParser and SafeConfigParser
should be completely identical to the Python standard library
versions.  Tested with the unit tests included with Python-2.3.4

The underlying INIConfig object can be accessed as cfg.data
iÿÿÿÿN(tDuplicateSectionErrortNoSectionErrort
NoOptionErrortInterpolationMissingOptionErrortInterpolationDepthErrortInterpolationSyntaxErrortDEFAULTSECTtMAX_INTERPOLATION_DEPTH(tErrortInterpolationErrortMissingSectionHeaderErrortParsingErrortRawConfigParsercBsýeZded„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zdd„Zdd	„Z
d
„Zd„Zd„Zhed
6ed6ed6ed6ed6ed6ed6ed6Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs<|tjotdƒ‚ntid|d|ƒ|_dS(NsCustom dict types not supportedtdefaultstoptionxformsource(tdictt
ValueErrortinit	INIConfigtdata(tselfR
t	dict_type((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt__init__s
cCs
|iƒS(N(tlower(Rt	optionstr((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytoptionxform#scCs=h}|ii}x$|iD]}|i|ƒ||<qW|S(N(Rt	_defaultst_optionst_compat_get(Rtdtsecobjtname((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR
&s
cCs
t|iƒS(s3Return a list of section names, excluding [DEFAULT](tlistR(R((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytsections-scCsX|iƒdjotd|‚n|i|ƒot|ƒ‚n|ii|ƒdS(séCreate a new section in the configuration.

        Raise DuplicateSectionError if a section by the specified name
        already exists.  Raise ValueError if name is DEFAULT or any of
        its case-insensitive variants.
        tdefaultsInvalid section name: %sN(RRthas_sectionRRt_new_namespace(Rtsection((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytadd_section1s
	cCs.y|i|tSWntj
otSXdS(s~Indicate whether the named section is present in the configuration.

        The DEFAULT section is not acknowledged.
        N(RtTruetKeyErrortFalse(RR%((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR#Bs
cCs;yt|i|ƒSWntj
ot|ƒ‚nXdS(s9Return a list of option names for the given section name.N(R RR(R(RR%((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytoptionsMscCsˆg}t|tƒo
|g}nx^|D]V}yt|ƒ}Wntj
o
q*nX|i|ƒ|ii|ƒ|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.
        (t
isinstancet
basestringtopentIOErrortappendRt_readfptclose(Rt	filenamest
files_readtfilenametfp((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytreadTs


cCs|ii|ƒ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.
        N(RR0(RR5R4((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytreadfpkscCs|i|ƒpt|ƒ‚n|dj	o||jo||}ny|i|}|i|ƒSWn"tj
ot||ƒ‚nXdS(N(R#RtNoneRRR(R(RR%toptiontvarstvaluetsec((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytgetus
c	CskyEg}x4|i|D]%}|i||i||ƒfƒqW|SWntj
ot|ƒ‚nXdS(N(RR/R=R(R(RR%tanstopt((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytitems€s#cCst|i||ƒƒS(N(tintR=(RR%R9((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytgetint‰scCst|i||ƒƒS(N(tfloatR=(RR%R9((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytgetfloatŒst1tyesttruetont0tnotfalsetoffcCsJ|i||ƒ}|iƒ|ijotd|‚n|i|iƒS(NsNot a boolean: %s(R=Rt_boolean_statesR(RR%R9tv((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt
getboolean’scCs^y|i|}Wntj
ot|ƒ‚nXy||tSWntj
otSXdS(s=Check for the existence of a given option in a given section.N(RR(RR'R)(RR%R9R<((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt
has_option˜scCs;y||i||<Wntj
ot|ƒ‚nXdS(sSet an option.N(RR(R(RR%R9R;((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytset¤scCs|it|iƒƒdS(s?Write an .ini-format representation of the configuration state.N(twritetstrR(RR5((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRR«scCsey|i|}Wntj
ot|ƒ‚nXy||||=dSWntj
odSXdS(sRemove an option.iiN(RR(R(RR%R9R<((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt
remove_option¯scCs#|i|ƒptS|i|=tS(sRemove a file section.(R#R)RR'(RR%((s3/usr/lib/python2.6/site-packages/iniparse/compat.pytremove_section¼s
N(t__name__t
__module__R8RRRR
R!R&R#R*R6R7R=R@RBRDR'R)RMRORPRQRRRTRU(((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRs*							
									
t
ConfigDictcBs eZdZd„Zd„ZRS(s*Present a dict interface to a ini section.cCs||_||_||_dS(N(tcfgR%R:(RRYR%R:((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRÇs		cCsOy#ti|i|i||iƒSWn%ttfj
ot|ƒ‚nXdS(N(RR=RYR%R:RRR((Rtkey((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt__getitem__Ìs#(RVRWt__doc__RR[(((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRXÄs	tConfigParsercBs/eZedd„Zd„Zedd„ZRS(cCs|tjo!|i|ƒot|ƒ‚n|i|ƒ}ti||||ƒ}|o|St|||ƒ}|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#RRRR=RXt_interpolate(RR%R9trawR:R;R((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR=ÕscCs©|}t}xj|ob|d8}d|joFy||}Wqttj
o%}t||||idƒ‚qtXqPqW|idƒdjot|||ƒ‚n|S(Nis%(iiÿÿÿÿ(RR(RtargstfindR(RR%R9trawvalR:R;tdepthte((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR^ìs

"c
CsA|tjo!|i|ƒot|ƒ‚n|djot|i|ƒ}nPg}x3|i|D]$}||jo|i|ƒqfqfW|i|iƒƒd|jo|i	dƒnt
|||ƒ}|o*g}|D]}||||fqã~Sg}	|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.
        RVN(RR#RR8R RR/textendtkeystremoveRXR^(
RR%R_R:R*txRt_[1]R9t_[2]((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR@þs$


#N(RVRWR)R8R=R^R@(((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR]Ós	tSafeConfigParsercBsSeZeidƒZeidƒZd„Zd„ZeidƒiZ	d„Z
RS(s
%\(([^)]+)\)ss%[^%]|%$cCsˆt|tƒptdƒ‚n|iid|ƒ}|ii|ƒ}|o td||iƒfƒ‚nt	i
||||ƒdS(Nsoption values must be stringsts1invalid interpolation syntax in %r at position %d(R+R,t	TypeErrort
_interpvar_retsubt_badpercent_retsearchRtstartR]RQ(RR%R9R;t	tmp_valuetm((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRQ%scCs/g}|i|||||dƒdi|ƒS(NiRl(t_interpolate_sometjoin(RR%R9RbR:tL((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyR^3scCs¾|tjot|||ƒ‚nx”|oŒ|idƒ}|djo|i|ƒdS|djo|i|| ƒ||}n|dd!}|djo|idƒ|d}q&|djoÐ|i|ƒ}	|	djot||d|ƒ‚n|	idƒ}
||	iƒ}y||
}Wn(t	j
ot
||||
ƒ‚nXd|jo$|i||||||dƒqµ|i|ƒq&t||dt|ƒƒ‚q&WdS(Nt%iiit(s'bad interpolation variable reference %rs+'%' must be followed by '%' or '(', found: (
RRRaR/t_interpvar_matchR8RtgrouptendR(RRutrepr(RR9taccumtrestR%tmapRctptcRttvarRN((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRu;sD








	
(RVRWtretcompileRnRpRQR^tmatchRzRu(((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyRk!s		(R\R„R]RRRRRRRRRR	R
RRtobjectRRXRk(((s3/usr/lib/python2.6/site-packages/iniparse/compat.pyt<module>s:	"§N

Youez - 2016 - github.com/yon3zu
LinuXploit