Changeset c1ba75b for python/lib/gen_code.py
- Timestamp:
- Dec 11, 2018, 4:47:32 PM (5 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 74c1fb9
- Parents:
- adc6e02 (diff), 6b84d81 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_code.py
radc6e02 rc1ba75b 232 232 233 233 def gen_doc(self): 234 out = """ 235 // TODO: add documentation 236 static char Py_{shortname}_doc[] = \"undefined\"; 234 sig = [] 235 for p in self.input_params: 236 name = p['name'] 237 defval = aubiodefvalue[name].replace('"','\\\"') 238 sig.append("{name}={defval}".format(defval=defval, name=name)) 239 out = """ 240 #ifndef PYAUBIO_{shortname}_doc 241 #define PYAUBIO_{shortname}_doc "{shortname}({sig})" 242 #endif /* PYAUBIO_{shortname}_doc */ 243 244 static char Py_{shortname}_doc[] = "" 245 PYAUBIO_{shortname}_doc 246 ""; 237 247 """ 238 return out.format( **self.__dict__)248 return out.format(sig=', '.join(sig), **self.__dict__) 239 249 240 250 def gen_new(self):
Note: See TracChangeset
for help on using the changeset viewer.