|
From: Michael F. <fuz...@vo...> - 2007-09-26 22:34:28
|
Stef Mientki wrote: >> Shock horror - Python is *built* on dictionaries! :-) >> >> > Yes I read that before, > but doesn't mean that everyone is using them (explictly) ;-) > (I mainly do signal analysis and simulation) > >> >> >>> Still one other small question, which must be peanuts for you (and others), >>> how do I read a value as a normal string ? >>> When I've an inifile with following content: >>> size = (134,433) >>> ConfigObj gives me back a list >>> ['(134', '433)'] >>> >>> >>> >> By default ConfigObj treats comma separated values as lists. >> > Yes I read that ... > so I tried > ini.list_values = False > but that didn't work. > >> This *can* >> be inconvenient, so you can switch it off. >> >> >> ini = ConfigObj(filename, list_values=False) >> >> >> > Thanks that works ok. > So why doesn't > ini.list_values = False > this work ? > Because by then ConfigObj has *already* read the values in. Changing the settings afterwards only affects how they are written back out. Michael http://www.manning.com/foord > cheers, > Stef > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > > |