"Spencer Parker" <inthefri...@gmail.com> wrote in message

I have a flat file database that I want to get information from. The basic
text looks like this:

ITEM    {
       "FULLNAME"      "apps114.chgit.com!file:/etc"
       "RECOVERY"      "0"
}

They are all on a separate line in the text file.  I had thought about
trying to drop it into a list or a dictionary.  Most likely a dictionary.

What would be the key and what would be the data?

With a regular structure delimited by braces you should be able
to process the file line by line fairly easily.


thought about using regular expressions to pull the data I need.

You probably don;t need regex, but it depends on what exactly
you want to filter/extract.

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to