6
from optparse import OptionParser
8
#Defining the command line arguments
9
usage = '%prog window_name output_file'
10
parser = OptionParser(usage)
11
(options, args) = parser.parse_args ()
14
parser.error ('Incorrect number of arguments')
16
app = context(args[0])
17
output = open(args[1], "w")
19
for component in app.getobjectlist():
20
role = getobjectproperty(args[0], component, 'class')
21
output.write(component + ", " + role + "\n")