From: Martin <mar...@gm...> - 2016-02-18 13:10:27
|
hi there, I'm having problems with nested lists: >>> from configobj import ConfigObj >>> config = ConfigObj('test.config') >>> nested_list = [5, [2,3], 6] >>> config['nested_list'] = nested_list >>> config.write() this produces $ tail test.config nested_list = 5, "[2, 3]", 6 rereading that config-file gives me this: >>> from configobj import ConfigObj >>> config = ConfigObj('test.config') >>> nested_list = config['nested_list'] >>> type(nested_list) <type 'list'> >>> type(nested_list[1]) <type 'str'> what am I doing wrong? any help would be appreciated! |