48 parser = OptionParser()
49 parser.add_option(
50 '--idl-attributes-file',
51 help="location of bindings/IDLExtendedAttributes.txt")
52 parser.add_option('--output-directory')
53 parser.add_option('--interfaces-info-file')
54 parser.add_option('--write-file-only-if-changed', type='int')
55
56 parser.disable_interspersed_args()
57
58 options, args = parser.parse_args()
59 if options.output_directory is None:
60 parser.error('Must specify output directory using --output-directory.')
61 options.write_file_only_if_changed = bool(
62 options.write_file_only_if_changed)
64 parser.error(
65 'Must specify exactly 1 input file as argument, but %d given.' %
67 idl_filename = os.path.realpath(args[0])
68 return options, idl_filename
69
70