%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/lvemanager/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyc

�
i�B^c@`syddlmZddlmZddlmZddlZddlmZddlmZdejfd��YZ	dS(	i(tprint_function(tdivision(tabsolute_importN(tStringIO(t
basestringtSectionlessConfigParsercB`sDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s�
    Extends ConfigParser to allow files without sections.

    This is done by wrapping read files and prepending them with a placeholder
    section, which defaults to '__config__'
    cO`sH|jdd�}tjj|||�d|_|j|p@d�dS(Ntdefault_sectiont
__config__(tpoptNonetConfigParsertRawConfigParsert__init__t_default_sectiontset_default_section(tselftargstkwargsR((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyRs	cC`s|jS(N(R
(R((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pytget_default_section scC`s�|j|�y&|j|j�}|j|j�Wntjk
rIn+Xx'|D]\}}|j|||�qQW||_dS(N(tadd_sectiontitemsR
tremove_sectionR
tNoSectionErrortset(Rtsectiontdefault_section_itemstkeytvalue((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyR#s
cC`s�t|t�r|g}ng}xX|D]P}y&t|��}|j|�WdQXWntk
rjq(q(X|j|�q(W|S(N(t
isinstanceRtopentreadfptIOErrortappend(Rt	filenamestread_oktfilenametfp((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pytread2s

cO`s�t�}y|j|_Wntk
r,nX|jd|jd�|j|j��|jdd�tjj	||||�S(Nt[s]
i(
RtnametAttributeErrortwriteR
R%tseekR
RR(RR$RRtstream((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyRBs	
cC`s�yc|j|j�}|j|j�x-|D]%\}}|jdj||��q,W|jd�Wntjk
rynXtjj||�|j|j�x*|D]"\}}|j	|j||�q�WdS(Ns{0}={1}
s
(
RR
RR)tformatR
RRRR(RR$RRR((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyR)Qs(	t__name__t
__module__t__doc__RRRR%RR)(((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyRs					(
t
__future__RRRR
Rt
past.builtinsRRR(((sI/opt/alt/python27/lib/python2.7/site-packages/lvemanager/config_parser.pyt<module>	s

Zerion Mini Shell 1.0