On 2011-01-08 04:24, Ying Zu wrote: > How to read ansic file into a pre-defined class? > > I have a series of files written in the following format, ... You might like to take a look at the json module if you aren't locked to the exact format you suggested. http://json.org/ http://docs.python.org/library/json.html#module-json