Re: parsing a dictionary from a string

2006-12-18 Thread Benjamin Georgi
Fredrik Lundh wrote: > Benjamin Georgi wrote: > >> I could use some help extracting the keys/values of a list of >> dictionaries from a string that is just the str() representation of the >> list (the problem is related to some flat file format I'm using for file >> IO). >> >> Example: >> >>>

Re: parsing a dictionary from a string

2006-12-16 Thread Peter Otten
Benjamin Georgi wrote: > I could use some help extracting the keys/values of a list of > dictionaries from a string that is just the str() representation of the > list (the problem is related to some flat file format I'm using for file > IO). > > Example: > >>> s = str(dict_list) > >>> s > '[{0

Re: parsing a dictionary from a string

2006-12-16 Thread Paul McGuire
"Benjamin Georgi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello list, > > I could use some help extracting the keys/values of a list of dictionaries > from a string that is just the str() representation of the list (the > problem is related to some flat file format I'm usin

Re: parsing a dictionary from a string

2006-12-15 Thread Fredrik Lundh
Benjamin Georgi wrote: > I could use some help extracting the keys/values of a list of > dictionaries from a string that is just the str() representation of the > list (the problem is related to some flat file format I'm using for file > IO). > > Example: > >>> s = str(dict_list) > >>> s > '

Re: parsing a dictionary from a string

2006-12-15 Thread Tim Williams
On 15/12/06, Benjamin Georgi <[EMAIL PROTECTED]> wrote: > Hello list, > > I could use some help extracting the keys/values of a list of > dictionaries from a string that is just the str() representation of the > list (the problem is related to some flat file format I'm using for file > IO). > > Exa

parsing a dictionary from a string

2006-12-15 Thread Benjamin Georgi
Hello list, I could use some help extracting the keys/values of a list of dictionaries from a string that is just the str() representation of the list (the problem is related to some flat file format I'm using for file IO). Example: >>> s = str(dict_list) >>> s '[{0: [2], 1: []}, {0: [], 1: