Hi all.
I have a lot of text blocks that looks like this one
*** Layer 3 Message type: CP-Data
Device: MS1
Time: 19:57:44.71
CP-User data
length : 37
RPDU
Message type indicator (MTI) : (1) RP-DATA
The question is how to parse given text block into a dictionary that looks
like the dictionary given below?
{'Device':'MS1','Time':'Time: 19:57:44.71','CP-User
data':{'length':'37','RPDU':{'Message type indicator (MTI)':'(1) RP-DATA'}}}
Any other thoughts about reading that kind of text?
Thanks,
Sergey
--
http://mail.python.org/mailman/listinfo/python-list