quick and dirty parsing utilities for listing slice attributes from slices.xml
[infrastructure.git] / slice-attributes / SlicesLoad.py
1 #!/usr/bin/env python
2
3 import sys
4 import pickle
5
6 class SlicesLoad:
7
8     def __init__ (self, filename):
9         self.filename=filename+".bin"
10         self.load()
11
12     def load (self):
13         
14         file = open(self.filename,'rb')
15         self.slices = pickle.load(file)
16         file.close()
17
18     def print_rspecs (self):
19         
20         for slice in self.slices:
21             print 'slice',slice,'->',self.slices[slice]
22
23 if __name__ == '__main__':
24
25     for filename in sys.argv[1:]:
26
27         sl_import = SlicesLoad(filename)
28         sl_import.print_rspecs()