Changeset 96672c0 in sasview for sansmodels/src/sans/models/c_models
- Timestamp:
- Oct 27, 2008 11:43:52 AM (16 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 4d3acb6
- Parents:
- 922b0d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/WrapperGenerator.py
r4e2f6ef8 r96672c0 88 88 rep += " struc name: %s\n" % self.structName 89 89 rep += " params: %s\n" % self.params 90 rep += " description: %s\n" % self.description 90 91 return rep 91 92 … … 106 107 self.details = "## Parameter details [units, min, max]\n" 107 108 self.details += " self.details = {}\n" 109 # Catch Description 110 key = "[DESCRIPTION]" 111 find_description= False 112 temp="" 113 for line in lines: 114 if line.count(key)>0 : 115 find_description= True 116 try: 117 index = line.index(key) 118 toks = line[index:].split("=",1 ) 119 temp=toks[1].lstrip().rstrip() 120 text='text' 121 key2="<%s>"%text.lower 122 if re.match(key2,temp)!=None: 123 index2 = line.index(key2) 124 temp=line[index:] 125 else: 126 self.description=temp 127 except: 128 raise ValueError, "Could not parse file %s" % self.file 129 if find_description: 130 text='text' 131 key2="</%s>"%text.lower 132 if re.match(key2,temp)!=None: 133 index2 = line.index(key2) 134 temp=line[:index] 135 temp+=line 136 self.description= temp 137 108 138 for line in lines: 109 139 … … 136 166 toks2 = toks[0].split(',') 137 167 self.structName = toks2[0].lstrip().rstrip() 138 168 169 170 139 171 # Catch struct content 140 172 key = "[DEFAULT]"
Note: See TracChangeset
for help on using the changeset viewer.