Re: help on Implementing a list of dicts with no data pattern

2013-05-09 Thread rlelis
On Thursday, May 9, 2013 7:19:38 PM UTC+1, Dave Angel wrote: Yes it's a list of string. I don't get the NameError: name 'file_content' is not defined in my code. After i appended the headers i wanted to cut the data list it little bit more because there was some data (imagine some other collumn

Re: help on Implementing a list of dicts with no data pattern

2013-05-09 Thread rlelis
On Thursday, May 9, 2013 12:47:47 AM UTC+1, rlelis wrote: @Dave Angel this is how i mange to read and store the data in file. data = [] # readdata f = open(source_file, 'r') for line in f: header = (line.strip()).lower() # conditions(if/else clauses) on the header content

Re: help on Implementing a list of dicts with no data pattern

2013-05-09 Thread rlelis
I apologize once again. Is my first post here and i'm getting used to the group as long as i get the feedback of my errors by you guys. I'm using Python 2.7.3 with no dependencies, i'm simply using the standard library. Here is the "big picture" of the scenario(i have added it in the pastebin lin

Re: help on Implementing a list of dicts with no data pattern

2013-05-09 Thread rlelis
On Thursday, May 9, 2013 12:47:47 AM UTC+1, rlelis wrote: > Hi guys, > > > > I'm working on this long file, where i have to keep reading and > > storing different excerpts of text (data) in different variables (list). > > > > Once done that i want to

help on Implementing a list of dicts with no data pattern

2013-05-08 Thread rlelis
Hi guys, I'm working on this long file, where i have to keep reading and storing different excerpts of text (data) in different variables (list). Once done that i want to store in dicts the data i got from the lists mentioned before. I want them on a list of dicts for later RDBMs purpose's. The