| Server IP : 156.238.232.47 / Your IP : 216.73.216.150 Web Server : nginx/1.25.3 System : Linux C202504152095410 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : www ( 1000) PHP Version : 8.3.25 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/lib/python2.7/site-packages/iniparse/ |
Upload File : |
�
�/�Sc @ s@ d Z d d l Z d d l m Z m Z m Z d d l Z d e f d � � YZ d e f d � � YZ d e f d � � YZ
d
e d � Z d e f d
� � YZ
d e f d � � YZ d e f d � � YZ d e f d � � YZ d d � Z d e j f d � � YZ d � Z d � Z d � Z d e j f d � � YZ d S( s� Access and/or modify INI files
* Compatiable with ConfigParser
* Preserves order of sections & options
* Preserves comments/blank lines/etc
* More conveninet access to data
Example:
>>> from StringIO import StringIO
>>> sio = StringIO('''# configure foo-application
... [foo]
... bar1 = qualia
... bar2 = 1977
... [foo-ext]
... special = 1''')
>>> cfg = INIConfig(sio)
>>> print cfg.foo.bar1
qualia
>>> print cfg['foo-ext'].special
1
>>> cfg.foo.newopt = 'hi!'
>>> cfg.baz.enabled = 0
>>> print cfg
# configure foo-application
[foo]
bar1 = qualia
bar2 = 1977
newopt = hi!
[foo-ext]
special = 1
<BLANKLINE>
[baz]
enabled = 0
i����N( t DEFAULTSECTt ParsingErrort MissingSectionHeaderErrort LineTypec B s5 e Z d Z d d � Z d � Z d � Z d � Z RS( c C s% | d k r! | j d � | _ n d S( Ns
( t Nonet stript line( t selfR ( ( s0 /usr/lib/python2.7/site-packages/iniparse/ini.pyt __init__4 s c C s$ | j d k r | j S| j � Sd S( N( R R t to_string( R ( ( s0 /usr/lib/python2.7/site-packages/iniparse/ini.pyt __str__: s c C s0 t | | � r d | j d <n | | j | <d S( NR ( t hasattrR t __dict__( R t namet value( ( s0 /usr/lib/python2.7/site-packages/iniparse/ini.pyt __setattr__B s c C s t d � � d S( Ns1 This method must be overridden in derived classes( t Exception( R ( ( s0 /usr/lib/python2.7/site-packages/iniparse/ini.pyR G s N( t __name__t
__module__R R R R
R R ( ( ( s0 /usr/lib/python2.7/site-packages/iniparse/ini.pyR 1 s
t SectionLinec B sJ e Z e j d � Z d d d d d � Z d � Z d � Z e e � Z RS( s7 ^\[(?P<name>[^]]+)\]\s*((?P<csep>;|#)(?P<comment>.*))?$i����c C s>