[Tutor] Parse text with python
Danilo Chilene
bicofino at gmail.com
Thu Oct 17 21:54:21 CEST 2013
Hello,
I have the text below:
CSMP0097I 14.42.12 CPU-B SS-BSS SSU-AA IS-02
-LAL USER CONTROL FILE-
MAXIMUM DEFINABLE USERS - 14999
MAXIMUM CONFIGURABLE USERS - 11790
CURRENT NUMBER USERS - 09692
USER FLUSH CRET TIME VALUE - 5
-LAL USER FILE-
NAME UORD T/O O OXIT RXIT S MAX INUSE PCT
---------------- ---- --- - ---- ---- - --------- --------- ---
J4IB 305 15 A 1700 6666 95
KEYWORDS - TA/J4IB CRTSST DYNTAC HSSPDB
DELTAS - OBTAIN 0 RELEASE 0 FLUSH VALUE 0
DR CANDIDATE - N REPORT - N
INUSE DATE - 10.17.2013
END OF DISPLAY
How I can grab the number 6666? My idea is to find the number 1700(this
number never changes) and count 6 chars and the print the next 4 chars. But
I didn't find *how to count chars and print next* on python.
Any ideas?
Best Regards,
Danilo F. Chilene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20131017/a46cf7e1/attachment.html>
More information about the Tutor
mailing list