source:
people/peter.buschman/backup_monitoring/parsing/parsers/dsu_ls_l/test.py
Last change on this file was 976, checked in by , on Dec 6, 2011 at 10:19:33 AM | |
---|---|
File size: 433 bytes |
Line | |
---|---|
1 | |
2 | import backup_monitoring.parsing.parsers.dsu_ls_l as dsu_ls_l |
3 | |
4 | input = open('test.txt', 'r') |
5 | |
6 | stream = dsu_ls_l.stream(input) |
7 | |
8 | for record in stream: |
9 | |
10 | dir = dsu_ls_l.parse(record) |
11 | |
12 | path = dir['path'] |
13 | total = dir['total'] |
14 | |
15 | print 'path = %s, total = %s' % (path, total) |
16 | |
17 | for filename in dir['files']: |
18 | |
19 | file = dir['files'][filename] |
20 | |
21 | print ' %s' % (filename) |
22 | |
23 | input.close() |
Note:
See TracBrowser
for help on using the repository browser.