python - How to parse INI style file -


i have file in format similar ini

[name1] valu1  [name2] value2  [section] [name3] valu3 

how parse such files in python

use configparser, documentation description:

this module defines class configparser. configparser class implements basic configuration file parser language provides structure similar find on microsoft windows ini files. can use write python programs can customized end users easily.


Comments

Popular posts from this blog

c++ - Linked List error when inserting for the last time -

java - activate/deactivate sonar maven plugin by profile? -

tsql - Pivot with Temp Table (definition for column must include data type) -- SQL Server 2008 -