Newbie needs help with regex strings
Catalina Scott A Contr AFCA/EVEO
scott.catalina.ctr at scott.af.mil
Wed Dec 14 10:23:01 EST 2005
More information about the Python-list mailing list
Wed Dec 14 10:23:01 EST 2005
- Previous message (by thread): Get rid of recursive call __getattr__
- Next message (by thread): Newbie needs help with regex strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I have a file with lines in the following format. pie=apple,quantity=1,cooked=yes,ingredients='sugar and cinnamon' Pie=peach,quantity=2,ingredients='peaches,powdered sugar' Pie=cherry,quantity=3,cooked=no,price=5,ingredients='cherries and sugar' I would like to pull out some of the values and write them to a csv file. For line in filea pie = regex quantity = regex cooked = regex ingredients = regex fileb.write (quantity,pie,cooked,ingredients) How can I retreive the values and assign them to a name? Thank you Scott
- Previous message (by thread): Get rid of recursive call __getattr__
- Next message (by thread): Newbie needs help with regex strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list