Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : fdshops ( 1003)
PHP Version : 8.2.21
Disable Function : NONE
Directory :  /lib/python2.7/site-packages/offlineimap/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python2.7/site-packages/offlineimap/CustomConfig.pyo
�
��Vc@s�ddlZddlZddlmZyddlmZmZWn'ek
rkddlmZmZnXddl	m
Z
defd��YZd�Zdd
d	��YZ
dS(i����N(texc_info(tSafeConfigParsertError(t	LocalEvaltCustomConfigParsercBsteZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
RS(cCstj|�d|_dS(N(Rt__init__tNonet	localeval(tself((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyRs
cOs4|j||�r,|j||f||�S|SdS(sdSame as config.get, but returns the value of `default`
        if there is no such option specified.N(t
has_optiontget(Rtsectiontoptiontdefaulttargstkwargs((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt
getdefault scOs4|j||�r,|j||f||�S|SdS(sgSame as config.getint, but returns the value of `default`
        if there is no such option specified.N(R	tgetint(RRRR
RR((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt
getdefaultint*scOs4|j||�r,|j||f||�S|SdS(siSame as config.getfloat, but returns the value of `default`
        if there is no such option specified.N(R	tgetfloat(RRRR
RR((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetdefaultfloat4scOs4|j||�r,|j||f||�S|SdS(skSame as config.getboolean, but returns the value of `default`
        if there is no such option specified.N(R	t
getboolean(RRRR
RR((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetdefaultboolean=scCsly,|j||�j�}tj||�SWn9tjk
rg}td||f�dt�d�nXdS(sJParses option as the list of values separated
        by the given regexp.sBad split regexp '%s': %siN(R
tstriptretsplitterrorRRR(RRRtseparator_retvalte((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetlistFscCs0|j||�r(|j|||f�S|SdS(saSame as getlist, but returns the value of `default`
        if there is no such option specified.N(R	R(RRRR
R((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetdefaultlistQscCshtjjtjjg}|jddd�}|j||�}tjj|�sdtj|d�n|S(Ntgeneraltmetadatas~/.offlineimapi�(tostpatht
expandusert
expandvarsRtapply_xformstexiststmkdir(Rtxformstdtmetadatadir((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetmetadatadirZscCs�|jdk	r|jStjjtjjg}|jdd�rg|jdd�}|j||�}nd}t	|�|_|jS(NR t
pythonfile(
RRR"R#R$R%R	R
R&R(RR)R#((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetlocalevalbscCs@|d}g|j�D]%}|j|�r|t|�^qS(s
Returns a list of sections that start with (str) key + " ".
        
        That is, if key is "Account", returns all section names that
        start with "Account ", but strips off the "Account ".
        
        For instance, for "Account Test", returns "Test".t (tsectionst
startswithtlen(Rtkeytx((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetsectionlistqs
cCs,|j||�s(|j|||�ndS(s�Set a value if it does not exist yet.

        This allows to set default if the user has not explicitly
        configured anything.N(R	tset(RRRtvalue((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytset_if_not_exists}scCs1|dkrdSx|D]}||�}qW|S(sApplies set of transformations to a string.

        Arguments:
         - string: source string; if None, then no processing will
           take place.
         - transforms: iterable that returns transformation function
           on each turn.

        Returns transformed string.N(R(Rtstringt
transformstf((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyR&�s

(t__name__t
__module__RRRRRRRR,R.R5R8R&(((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyRs		
	
											
cCsdS(s�Just a constant that won't occur anywhere else.

    This allows us to differentiate if the user has passed in any
    default value to the getconf* functions in ConfigHelperMixin
    derived classes.N((((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytCustomConfigDefault�stConfigHelperMixincBsqeZdZd�Zd�Zd�Zed�Zed�Zed�Z	ed�Z
ed�Zed	�ZRS(
s�Allow comfortable retrieving of config values pertaining
    to a section.

    If a class inherits from cls:`ConfigHelperMixin`, it needs
    to provide 2 functions:
    - meth:`getconfig` (returning a CustomConfigParser object)
    - and meth:`getsection` (returning a string which represents
      the section to look up).
    All calls to getconf* will then return the configuration values
    for the CustomConfigParser object in the specific section.
    cGsW|j�|g}|tkr2||t|��S|j|�||t|��SdS(s�Returns configuration or default value for option
        that contains in section identified by getsection().

        Arguments:
        - option: name of the option to retrieve;
        - default: governs which function we will call.
          * When CustomConfigDefault is passed, we will call
          the mainfunc.
          * When any other value is passed, we will call
          the defaultfunc and the value of `default` will
          be passed as the third argument to this function.
        - defaultfunc and mainfunc: processing helpers.
        - args: additional trailing arguments that will be passed
          to all processing helpers.
        N(t
getsectionR>tlisttappend(RRR
tdefaultfunctmainfuncRtlst((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt_confighelper_runner�s

cCstd��dS(s�Returns CustomConfigParser object that we will use
        for all our actions.

        Must be overriden in all classes that use this mix-in.s0ConfigHelperMixin.getconfig() is to be overridenN(tNotImplementedError(R((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt	getconfig�scCstd��dS(s�Returns name of configuration section in which our
        class keeps its configuration.

        Must be overriden in all classes that use this mix-in.s1ConfigHelperMixin.getsection() is to be overridenN(RG(R((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyR@�scCs(|j|||j�j|j�j�S(s�Retrieves string from the configuration.

        Arguments:
         - option: option name whose value is to be retrieved;
         - default: default return value if no such option
           exists.
        (RFRHRR
(RRR
((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetconf�s	cCs(|j||�}|j�j||�S(s�Retrieves string from the configuration transforming the result.

        Arguments:
         - option: option name whose value is to be retrieved;
         - xforms: iterable that returns transform functions
           to be applied to the value of the option,
           both retrieved and default one;
         - default: default value for string if no such option
           exists.
        (RIRHR&(RRR)R
R7((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt
getconf_xform�scCs(|j|||j�j|j�j�S(s�Retrieves boolean value from the configuration.

        Arguments:
         - option: option name whose value is to be retrieved;
         - default: default return value if no such option
           exists.
        (RFRHRR(RRR
((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetconfboolean�s	cCs(|j|||j�j|j�j�S(s�
        Retrieves integer value from the configuration.

        Arguments:
         - option: option name whose value is to be retrieved;
         - default: default return value if no such option
           exists.

        (RFRHRR(RRR
((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt
getconfintscCs(|j|||j�j|j�j�S(s�Retrieves floating-point value from the configuration.

        Arguments:
         - option: option name whose value is to be retrieved;
         - default: default return value if no such option
           exists.
        (RFRHRR(RRR
((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetconffloats	cCs+|j|||j�j|j�j|�S(sgRetrieves strings from the configuration and splits it
        into the list of strings.

        Arguments:
         - option: option name whose value is to be retrieved;
         - separator_re: regular expression for separator
           to be used for split operation;
         - default: default return value if no such option
           exists.
        (RFRHRR(RRRR
((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pytgetconflist)s
(
R<R=t__doc__RFRHR@R>RIRJRKRLRMRN(((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyR?�s			
((R"RtsysRtConfigParserRRtImportErrortconfigparsertofflineimap.localevalRRR>R?(((s</usr/lib/python2.7/site-packages/offlineimap/CustomConfig.pyt<module>s
	

Spamworldpro Mini