1 #!/usr/bin/env python 2 3 import sys 4 5 if len(sys.argv) < 3: 6 print >>sys.stderr, "Usage: %s <filename> <access>" % sys.argv[0] 7 sys.exit(1) 8 9 filename = sys.argv[1] 10 access = sys.argv[2] 11 12 f = open(filename) 13 try: 14 for line in f.xreadlines(): 15 columns = line.rstrip().split() 16 if not columns[0].startswith(access): 17 continue 18 19 location, name, test, test_type, base, traversed, traversal_modes, \ 20 attrnames, context, context_test, first_method, final_method, attr, \ 21 accessor_kinds = columns 22 23 print "Location:", location 24 print "Name:", name 25 print "Test:", test 26 print "Test type:", test_type 27 print "Base:", base 28 print "Traversed:", traversed 29 print "Traversal modes:", traversal_modes 30 print "Attribute names:", attrnames 31 print "Context:", context 32 print "Context test:", context_test 33 print "First method:", first_method 34 print "Final method:", final_method 35 print "Origin/attribute:", attr 36 print "Accessor kinds:", accessor_kinds 37 print 38 39 finally: 40 f.close() 41 42 # vim: tabstop=4 expandtab shiftwidth=4