Changeset 3688
- Timestamp:
- 05/07/07 11:54:35 (6 years ago)
- Files:
-
- 1 modified
-
experimental/compform/trunk/compform/compform.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
experimental/compform/trunk/compform/compform.py
r3222 r3688 23 23 24 24 def create_complist(self, component): 25 '''Creates a component list out of the single component for the application_gen function in WaveDev.''' 25 26 active_wave = WaveformClass.Waveform() 26 27 … … 40 41 '''parse the input arguments, and make function calls to create the waveform''' 41 42 43 #check to make sure all the command line arguments are present 42 44 if len(sys.argv) == 1 or len(sys.argv) == 2 or len(sys.argv) > 4: 43 45 print "i'm going to want a component, an install dir and an optional waveform name" 44 46 sys.exit() 45 47 46 comp_in = sys.argv[1] 47 genPath = sys.argv[2] 48 comp_in = sys.argv[1] #name of the component that will be used 49 genPath = sys.argv[2] #where the generated XML will go 48 50 51 #if the user did not specify a waveform name, create one 49 52 if len(sys.argv) == 3: 50 53 waveName = comp_in + "_waveform" 51 54 print "waveform name is " + waveName 52 55 #if the user did set a waveform name, read it from the command line 53 56 elif len(sys.argv) == 4: 54 57 waveName = sys.argv[3] 55 58 print "waveform name is " + waveName 56 59 57 58 60 my_compform = compform() 59 61 60 62 component = my_compform.get_the_resource(comp_in) 61 62 63 complist = my_compform.create_complist(component) 63 64 64 # need to make the directories65 #make the directory to put the XML 65 66 if os.path.exists(genPath+waveName) == False: 66 os.mkdir(genPath+waveName) 67 os.mkdir(genPath+'/'+waveName) 68 67 69 68 app_gen.genxml(complist, genPath, waveName) 69 70 app_gen.genxml(complist, genPath, waveName) #generate the SAD file 71 app_gen.genDAS(complist, genPath, waveName) #generate the DAS file 70 72 71 73 … … 75 77 76 78 print "non-commandline module call is not yet supported" 77 79 sys.exit() 78 80 79 81