how to parse structured text file?

Petr Jakes petr at tpc.cz
Tue Jan 31 19:22:53 EST 2006


I have a file which contains data in the format shown in the sample
bellow.
How can I parse it to get following:
(14,trigger,guard,do_action,15)

Thanks a lot for your postings
Petr Jakes

type:
4
bgrColor:
255 255 255
fgrColor:
0 0 0
objId:
16
Num.Pts:
2
177 104
350 134
objStartId:
14
objEndId:
15
eventName:
trigger
eventCond:
guard
eventAction:
do_action




More information about the Python-list mailing list