|
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/21573/root/usr/lib/python2.4/site-packages/iniparse/ |
Upload File : |
mò
½Pc @ sÊ d Z d k Z d k l Z l Z l Z l Z l Z l Z l Z l
Z
d k l Z l Z l
Z
l Z d k Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d
e f d „ ƒ YZ d S( 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
N( s DuplicateSectionErrors NoSectionErrors
NoOptionErrors InterpolationMissingOptionErrors InterpolationDepthErrors InterpolationSyntaxErrors DEFAULTSECTs MAX_INTERPOLATION_DEPTH( s Errors InterpolationErrors MissingSectionHeaderErrors ParsingErrort RawConfigParserc B s
t Z d d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d d „ Z d d
„ Z d „ Z
d „ Z d
„ Z h d e <d e <d e <d e <d e <d e <d e <d e <Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( Nc C s t i d | d | ƒ | _ d S( Nt defaultst optionxformsource( t init INIConfigR t selft data( R R ( ( t3 /usr/lib/python2.4/site-packages/iniparse/compat.pyt __init__ s c C s
| i ƒ S( N( t optionstrt lower( R R ( ( R t optionxform! s c C s= h } x0 | i i i i ƒ D] \ } } | i | | <q W| S( N( t dR R t _defaultst _optionst itemst namet lineobjt value( R R R R ( ( R R $ s
c C s
t | i ƒ S( s3 Return a list of section names, excluding [DEFAULT]N( t listR R ( R ( ( R t sections* s c C s4 | i | ƒ o t | ƒ ‚ n | i i | ƒ d S( s“ Create a new section in the configuration.
Raise DuplicateSectionError if a section by the specified name
already exists.
N( R t has_sectiont sectiont DuplicateSectionErrorR t
new_namespace( R R ( ( R t add_section. s c C s1 y | i | t SWn t j
o t Sn Xd S( s~ Indicate whether the named section is present in the configuration.
The DEFAULT section is not acknowledged.
N( R R R t Truet KeyErrort False( R R ( ( R R 9 s c C s; y t | i | ƒ SWn t j
o t | ƒ ‚ n Xd S( s9 Return a list of option names for the given section name.N( R R R R R t NoSectionError( R R ( ( R t optionsD s
c C sˆ g } t | t ƒ o
| g } n x^ | D]V } y t | ƒ } Wn t j
o
q* n X| i | ƒ | 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.
N(
t
files_readt
isinstancet filenamest
basestringt filenamet opent fpt IOErrort appendR R t readfpt close( R R! R% R# R ( ( R t readK s
c C s | i i | ƒ d S( s Like 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( R R R( R% ( R R% R# ( ( R R( b s c C s„ | i | ƒ p t | ƒ ‚ n | d j o | | j o | | } n y | i | | SWn"