def set_license_keywords(self, dkws): lic = self._license_file m = markup.license_file(lic).splitlines() nl = [] for s in m: for i in dkws.items(): s = s.replace("{" + i[0] + "}", i[1]) nl.append(s) nl = os.linesep.join(nl) buff = self._TextLicense buff.set_markup(nl)
def set_license_file(self, textfile): buff = self._TextLicense self._license_file = textfile m = markup.license_file(textfile) buff.set_markup(m)