def write_code_versions(path, cp): code_version_dict = get_code_version_numbers(cp) html_text = "" for key, value in code_version_dict.items(): html_text += "<li><b>%s</b>: %s </li>\n" % (key, value.replace("@", "@")) kwds = {"render-function": "render_text", "title": "Version Information from Executables"} save_fig_with_metadata( html_escape(html_text), os.path.join(path, "version_information_from_executables.html"), **kwds )
def write_code_versions(path, cp): code_version_dict = get_code_version_numbers(cp) html_text = '' for key,value in code_version_dict.items(): html_text+= '<li><b>%s</b>: %s </li>\n' %(key,value.replace('@', '@')) kwds = {'render-function' : 'render_text', 'title' : 'Version Information from Executables', } save_fig_with_metadata(html_escape(html_text), os.path.join(path,'version_information_from_executables.html'), **kwds)
def write_library_information(path): library_list = get_library_version_info() for curr_lib in library_list: lib_name = curr_lib["Name"] text = "" for key, value in curr_lib.items(): text += "<li> %s : %s </li>\n" % (key, value) kwds = {"render-function": "render_text", "title": "%s Version Information" % lib_name} save_fig_with_metadata( html_escape(text), os.path.join(path, "%s_version_information.html" % (lib_name)), **kwds )
def write_library_information(path): library_list = get_library_version_info() for curr_lib in library_list: lib_name = curr_lib['Name'] text = '' for key, value in curr_lib.items(): text+='<li> %s : %s </li>\n' %(key,value) kwds = {'render-function' : 'render_text', 'title' : '%s Version Information'%lib_name, } save_fig_with_metadata(html_escape(text), os.path.join(path,'%s_version_information.html' %(lib_name)), **kwds)
def write_code_versions(path, cp): code_version_dict = get_code_version_numbers(cp) html_text = '' for key,value in code_version_dict.items(): # value might be a str or a bytes object in python3. python2 is happy # to combine these objects (or uniocde and str, their equivalents) # but python3 is not. try: value = value.decode() except AttributeError: pass html_text+= '<li><b>%s</b>:<br><pre>%s</pre></li><hr><br><br>\n' \ % (key, str(value).replace('@', '@')) kwds = {'render-function' : 'render_text', 'title' : 'Version Information from Executables', } save_fig_with_metadata(html_escape(html_text), os.path.join(path,'version_information_from_executables.html'), **kwds)