Server IP : 103.53.40.154 / Your IP : 3.139.83.248 Web Server : Apache System : Linux md-in-35.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : ppcad7no ( 715) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /lib/python2.7/site-packages/iniparse/ |
[ Home ] | [ C0mmand ] | [ 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>