source:
people/peter.buschman/backup_monitoring/parsing/parsers/bpplclients/test.py@
976
Last change on this file since 976 was 976, checked in by , on Dec 6, 2011 at 10:19:33 AM | |
---|---|
File size: 398 bytes |
Line | |
---|---|
1 | |
2 | import time |
3 | |
4 | from backup_monitoring.parsing.parsers import bpplclients as parser |
5 | |
6 | file = open('test.txt', 'r') |
7 | |
8 | stream = parser.stream(file) |
9 | |
10 | i = 0 |
11 | |
12 | for record in stream: |
13 | |
14 | i += 1 |
15 | |
16 | print i |
17 | |
18 | #print record |
19 | |
20 | instance = parser.parse(record) |
21 | |
22 | for key, value in instance.items(): |
23 | print '[%s] = [%s]' % (key, value) |
24 | |
25 | # time.sleep(5) |
26 | |
27 | file.close() |
Note:
See TracBrowser
for help on using the repository browser.