#!/usr/bin/env python import os, sys, re, getopt, string, glob, xml.dom.minidom, pprint, zipfile, tempfile from XmlRoutines import * from WorkspaceRoutines import * def parseMsa(msaFile, spdDir): filelist = [msaFile] msaDir = os.path.dirname(msaFile) msa = xml.dom.minidom.parse(inWorkspace(msaFile)) xmlPaths = [ "/ModuleSurfaceArea/SourceFiles/Filename" ] for xmlPath in xmlPaths: for f in XmlList(msa, xmlPath): filelist.append(str(os.path.join(msaDir, XmlElementData(f)))) return filelist def parseSpd(spdFile): filelist = [spdFile] msaFileList = [] spdDir = os.path.dirname(spdFile) spd = xml.dom.minidom.parse(inWorkspace(spdFile)) xmlPaths = [ "/PackageSurfaceArea/LibraryClassDeclarations/LibraryClass/IncludeHeader", "/PackageSurfaceArea/IndustryStdIncludes/IndustryStdHeader/IncludeHeader", "/PackageSurfaceArea/