?¡ëPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À?¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
Better INI parser for Python
iniparse
is a INI parser for
Python
which is:
ConfigParser
:
Backward compatible implementations of ConfigParser
,
RawConfigParser
, and SafeConfigParser
are included that are API-compatible with the Python standard
library.cfg.user.name
), or using container syntax
(cfg['user']['name']
).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.
Website: http://code.google.com/p/iniparse/
>>> from iniparse import INIConfig >>> cfg = INIConfig(file('options.ini'))
>>> print cfg.playlist.expand_playlist True >>> print cfg.ui.width 150 >>> cfg.ui.width = 200 >>> print cfg['ui']['width'] 200
>>> print cfg [playlist] expand_playlist = True [ui] display_clock = True display_qlength = True width = 200
>>> from iniparse import ConfigParser >>> cfgpr = ConfigParser() >>> cfgpr.read('options.ini') >>> print cfgpr.get('ui', 'width') 150 >>> cfgpr.set('ui', 'width', 175)
>>> print cfgpr.data.playlist.expand_playlist True >>> cfgpr.data.ui.width = 200 >>> print cfgpr.data.ui.width 200
>>> 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
>>> 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