b@1481: #!/usr/bin/python b@1481: # -*- coding: utf-8 -*- b@1481: b@1481: import xml.etree.ElementTree as ET b@1481: import os # for getting files from directory b@1481: import operator # for sorting data with multiple keys b@1481: import sys # for accessing command line arguments b@1481: import subprocess # for calling pdflatex b@1481: import shlex # for calling pdflatex b@1481: import matplotlib.pyplot as plt # plots b@1481: import numpy as np # numbers b@1481: b@1481: # Command line arguments b@1481: assert len(sys.argv)<4, "evaluation_stats takes at most 2 command line argument\n"+\ b@1481: "Use: python generate_report.py [results_folder] [no_render | -nr]" b@1481: b@1481: render_figures = True b@1481: b@1481: # XML results files location b@1481: if len(sys.argv) == 1: b@1481: folder_name = "../saves" # Looks in 'saves/' folder from 'scripts/' folder b@1481: print "Use: python generate_report.py [results_folder] [no_render | -nr]" b@1481: print "Using default path: " + folder_name b@1481: elif len(sys.argv) == 2: b@1481: folder_name = sys.argv[1] # First command line argument is folder b@1481: elif len(sys.argv) == 3: b@1481: folder_name = sys.argv[1] # First command line argument is folder b@1481: assert sys.argv[2] in ('no_render','-nr'), "Second argument not recognised. \n" +\ b@1481: "Use: python generate_report.py [results_folder] [no_render | -nr]" b@1481: # Second command line argument is [no_render | -nr] b@1481: render_figures = False b@1481: b@1481: def isNaN(num): b@1481: return num != num b@1481: b@1481: # Turn number of seconds (int) to '[minutes] min [seconds] s' (string) b@1481: def seconds2timestr(time_in_seconds): b@1481: if time_in_seconds is not None and not isNaN(time_in_seconds): b@1481: time_in_minutes = int(time_in_seconds/60) b@1481: remaining_seconds = int(time_in_seconds%60) b@1481: return str(time_in_minutes) + " min " + str(remaining_seconds) + " s" b@1481: else: b@1481: return 'N/A' b@1481: b@1481: # stats initialisation b@1481: number_of_XML_files = 0 b@1481: number_of_pages = 0 b@1481: number_of_fragments = 0 b@1481: total_empty_comments = 0 b@1481: total_not_played = 0 b@1481: total_not_moved = 0 b@1481: time_per_page_accum = 0 b@1481: b@1481: # arrays initialisation b@1481: page_names = [] b@1481: real_page_names = [] # regardless of differing numbers of fragments b@1481: subject_count = [] # subjects per audioholder name b@1481: page_count = [] b@1481: duration_page = [] # duration of experiment in function of page content b@1481: duration_order = [] # duration of experiment in function of page number b@1481: fragments_per_page = [] # number of fragments for corresponding page b@1481: b@1481: # survey stats b@1481: gender = [] b@1481: age = [] b@1481: b@1481: # get username if available b@1481: for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'): b@1481: user = os.environ.get(name) b@1481: if user: b@1481: break b@1481: else: b@1481: user = '' b@1481: b@1481: b@1481: # begin LaTeX document b@1481: header = r'''\documentclass[11pt, oneside]{article} b@1481: \usepackage{geometry} b@1481: \geometry{a4paper} b@1481: \usepackage[parfill]{parskip} % empty line instead of indent b@1481: \usepackage{graphicx} % figures b@1481: \usepackage{hyperref} b@1481: \usepackage{tikz} % pie charts b@1481: \title{Report} b@1481: \author{'''+\ b@1481: user+\ b@1481: r'''} b@1481: \graphicspath{{'''+\ b@1481: folder_name+\ b@1481: r'''/}} b@1481: %\setcounter{section}{-1} % Summary section 0 so number of sections equals number of files b@1481: \begin{document} b@1481: \maketitle b@1481: This is an automatically generated report using the `generate\_report.py' Python script b@1481: included with the Web Audio Evaluation Tool \cite{WAET} distribution which can be found b@1481: at \texttt{code.soundsoftware.ac.uk/projects/webaudioevaluationtool}. b@1481: \tableofcontents b@1481: b@1481: ''' b@1481: b@1481: footer = '\n\t\t'+r'''\begin{thebibliography}{9} b@1481: \bibitem{WAET} % reference to accompanying publication b@1481: Nicholas Jillings, Brecht De Man, David Moffat and Joshua D. Reiss, b@1481: ``Web Audio Evaluation Tool: A browser-based listening test environment,'' b@1481: presented at the 12th Sound and Music Computing Conference, July 2015. b@1481: \end{thebibliography} b@1481: \end{document}''' b@1481: b@1481: body = '' b@1481: b@1481: # generate images for later use b@1481: if render_figures: b@1481: subprocess.call("python timeline_view_movement.py "+folder_name, shell=True) b@1481: subprocess.call("python score_parser.py "+folder_name, shell=True) b@1481: subprocess.call("python score_plot.py "+folder_name, shell=True) b@1481: b@1481: # get every XML file in folder b@1481: files_list = os.listdir(folder_name) b@1481: for file in files_list: # iterate over all files in files_list b@1481: if file.endswith(".xml"): # check if XML file b@1481: number_of_XML_files += 1 b@1481: tree = ET.parse(folder_name + '/' + file) b@1481: root = tree.getroot() b@1481: b@1481: # PRINT name as section b@1481: body+= '\n\section{'+file[:-4].capitalize()+'}\n' # make section header from name without extension b@1481: b@1481: # reset for new subject b@1481: total_duration = 0 b@1481: page_number = 0 b@1481: b@1481: individual_table = '\n' # table with stats for this individual test file b@1481: timeline_plots = '' # plots of timeline (movements and plays) b@1481: b@1481: # DEMO survey stats b@1481: # get gender b@1481: this_subjects_gender = root.find("./posttest/radio/[@id='gender']") b@1481: if this_subjects_gender is not None: b@1481: gender.append(this_subjects_gender.get("name")) b@1481: else: b@1481: gender.append('UNAVAILABLE') b@1481: # get age b@1481: this_subjects_age = root.find("./posttest/number/[@id='age']") b@1481: if this_subjects_age is not None: b@1481: age.append(this_subjects_age.text) b@1481: #TODO add plot of age b@1481: b@1481: # get list of all page names b@1481: for audioholder in root.findall("./audioholder"): # iterate over pages b@1481: page_name = audioholder.get('id') # get page name b@1481: b@1481: if page_name is None: # ignore 'empty' audio_holders b@1481: print "WARNING: " + file + " contains empty audio holder. (evaluation_stats.py)" b@1481: break # move on to next b@1481: b@1481: number_of_comments = 0 # for this page b@1481: number_of_missing_comments = 0 # for this page b@1481: not_played = [] # for this page b@1481: not_moved = [] # for this page b@1481: b@1481: if audioholder.find("./metric/metricresult[@id='testTime']") is not None: # check if time is included b@1481: # 'testTime' keeps total duration: subtract time so far for duration of this audioholder b@1481: duration = float(audioholder.find("./metric/metricresult[@id='testTime']").text) - total_duration b@1481: b@1481: # total duration of test b@1481: total_duration += duration b@1481: else: b@1481: duration = float('nan') b@1481: total_duration = float('nan') b@1481: b@1481: # number of audio elements b@1481: audioelements = audioholder.findall("./audioelement") # get audioelements b@1481: number_of_fragments += len(audioelements) # add length of this list to total b@1481: b@1481: # number of comments (interesting if comments not mandatory) b@1481: for audioelement in audioelements: b@1481: response = audioelement.find("./comment/response") b@1481: was_played = audioelement.find("./metric/metricresult/[@name='elementFlagListenedTo']") b@1481: was_moved = audioelement.find("./metric/metricresult/[@name='elementFlagMoved']") b@1481: if response.text is not None and len(response.text) > 1: b@1481: number_of_comments += 1 b@1481: else: b@1481: number_of_missing_comments += 1 b@1481: if was_played is not None and was_played.text == 'false': b@1481: not_played.append(audioelement.get('id')) b@1481: if was_moved is not None and was_moved.text == 'false': b@1481: not_moved.append(audioelement.get('id')) b@1481: b@1481: # update global counters b@1481: total_empty_comments += number_of_missing_comments b@1481: total_not_played += len(not_played) b@1481: total_not_moved += len(not_moved) b@1481: b@1481: # PRINT alerts when elements not played or markers not moved b@1481: # number of audio elements not played b@1481: if len(not_played) > 1: b@1481: body += '\t\t\\emph{\\textbf{ATTENTION: '+str(len(not_played))+\ b@1481: ' fragments were not listened to in '+page_name+'! }}'+\ b@1481: ', '.join(not_played)+'\\\\ \n' b@1481: if len(not_played) == 1: b@1481: body += '\t\t\\emph{\\textbf{ATTENTION: one fragment was not listened to in '+page_name+'! }}'+\ b@1481: not_played[0]+'\\\\ \n' b@1481: b@1481: # number of audio element markers not moved b@1481: if len(not_moved) > 1: b@1481: body += '\t\t\\emph{\\textbf{ATTENTION: '+str(len(not_moved))+\ b@1481: ' markers were not moved in '+page_name+'! }}'+\ b@1481: ', '.join(not_moved)+'\\\\ \n' b@1481: if len(not_moved) == 1: b@1481: body += '\t\t\\emph{\\textbf{ATTENTION: one marker was not moved in '+page_name+'! }}'+\ b@1481: not_moved[0]+'\\\\ \n' b@1481: b@1481: # PRINT song-specific statistic b@1481: individual_table += '\t\t'+page_name+'&'+\ b@1481: str(number_of_comments) + '/' +\ b@1481: str(number_of_comments+number_of_missing_comments)+'&'+\ b@1481: seconds2timestr(duration)+'\\\\\n' b@1481: b@1481: # get timeline for this audioholder b@1481: img_path = 'timelines_movement/'+file[:-4]+'-'+page_name+'.pdf' b@1481: b@1481: # check if available b@1481: if os.path.isfile(folder_name+'/'+img_path): b@1481: # SHOW timeline image b@1481: timeline_plots += '\\includegraphics[width=\\textwidth]{'+\ b@1481: folder_name+'/'+img_path+'}\n\t\t' b@1481: b@1481: # keep track of duration in function of page index b@1481: if len(duration_order)>page_number: b@1481: duration_order[page_number].append(duration) b@1481: else: b@1481: duration_order.append([duration]) b@1481: b@1481: # keep list of audioholder ids and count how many times each audioholder id b@1481: # was tested, how long it took, and how many fragments there were b@1481: # (if number of fragments is different, store as different audioholder id) b@1481: if page_name in page_names: b@1481: page_index = page_names.index(page_name) # get index b@1481: # check if number of audioelements the same b@1481: if len(audioelements) == fragments_per_page[page_index]: b@1481: page_count[page_index] += 1 b@1481: duration_page[page_index].append(duration) b@1481: else: # make new entry b@1481: alt_page_name = page_name+"("+str(len(audioelements))+")" b@1481: if alt_page_name in page_names: # if already there b@1481: alt_page_index = page_names.index(alt_page_name) # get index b@1481: page_count[alt_page_index] += 1 b@1481: duration_page[alt_page_index].append(duration) b@1481: else: b@1481: page_names.append(alt_page_name) b@1481: page_count.append(1) b@1481: duration_page.append([duration]) b@1481: fragments_per_page.append(len(audioelements)) b@1481: else: b@1481: page_names.append(page_name) b@1481: page_count.append(1) b@1481: duration_page.append([duration]) b@1481: fragments_per_page.append(len(audioelements)) b@1481: b@1481: # number of subjects per audioholder regardless of differing numbers of b@1481: # fragments (for inclusion in box plots) b@1481: if page_name in real_page_names: b@1481: page_index = real_page_names.index(page_name) # get index b@1481: subject_count[page_index] += 1 b@1481: else: b@1481: real_page_names.append(page_name) b@1481: subject_count.append(1) b@1481: b@1481: # bookkeeping b@1481: page_number += 1 # increase page count for this specific test b@1481: number_of_pages += 1 # increase total number of pages b@1481: time_per_page_accum += duration # total duration (for average time spent per page) b@1481: b@1481: # PRINT table with statistics about this test b@1481: body += '\t\t'+r'''\begin{tabular}{|p{3.5cm}|c|p{2.5cm}|} b@1481: \hline b@1481: \textbf{Song name} & \textbf{Comments} & \textbf{Duration} \\ \hline '''+\ b@1481: individual_table+'\t\t'+\ b@1481: r'''\hline b@1481: \textbf{TOTAL} & & \textbf{'''+\ b@1481: seconds2timestr(total_duration)+\ b@1481: r'''}\\ b@1481: \hline b@1481: \end{tabular} b@1481: b@1481: ''' b@1481: # PRINT timeline plots b@1481: body += timeline_plots b@1481: b@1481: # join to footer b@1481: footer = body + footer b@1481: b@1481: # empty body again b@1481: body = '' b@1481: b@1481: # PRINT summary of everything (at start) b@1481: # unnumbered so that number of sections equals number of files b@1481: body += '\section*{Summary}\n\t\t\\addcontentsline{toc}{section}{Summary}\n' b@1481: b@1481: # PRINT table with statistics b@1481: body += '\t\t\\begin{tabular}{ll}\n\t\t\t' b@1481: body += r'Number of XML files: &' + str(number_of_XML_files) + r'\\'+'\n\t\t\t' b@1481: body += r'Number of pages: &' + str(number_of_pages) + r'\\'+'\n\t\t\t' b@1481: body += r'Number of fragments: &' + str(number_of_fragments) + r'\\'+'\n\t\t\t' b@1481: body += r'Number of empty comments: &' + str(total_empty_comments) +\ b@1481: " (" + str(round(100.0*total_empty_comments/number_of_fragments,2)) + r"\%)\\"+'\n\t\t\t' b@1481: body += r'Number of unplayed fragments: &' + str(total_not_played) +\ b@1481: " (" + str(round(100.0*total_not_played/number_of_fragments,2)) + r"\%)\\"+'\n\t\t\t' b@1481: body += r'Number of unmoved markers: &' + str(total_not_moved) +\ b@1481: " (" + str(round(100.0*total_not_moved/number_of_fragments,2)) + r"\%)\\"+'\n\t\t\t' b@1481: body += r'Average time per page: &' + seconds2timestr(time_per_page_accum/number_of_pages) + r"\\"+'\n\t\t' b@1481: body += '\\end{tabular} \\vspace{1.5cm} \\\\ \n' b@1481: b@1481: # Average duration for first, second, ... page b@1481: body += "\t\t\\vspace{.5cm} \n\n\t\tAverage duration per page (see also Figure \\ref{fig:avgtimeperpage}): \\\\ \n\t\t" b@1481: body += r'''\begin{tabular}{lll} b@1481: \textbf{Page} & \textbf{Duration} & \textbf{\# subjects}\\''' b@1481: tpp_averages = [] # store average time per page b@1481: for page_number in range(len(duration_order)): b@1481: body += '\n\t\t\t'+str(page_number+1) + "&" +\ b@1481: seconds2timestr(sum(duration_order[page_number])/len(duration_order[page_number])) +\ b@1481: "&"+str(len(duration_order[page_number]))+r"\\" b@1481: tpp_averages.append(sum(duration_order[page_number])/len(duration_order[page_number])) b@1481: b@1481: body += '\n\t\t\\end{tabular} \\vspace{1.5cm} \\\\ \n\n\t\t' b@1481: b@1481: # SHOW bar plot of average time per page b@1481: plt.bar(range(1,len(duration_order)+1), np.array(tpp_averages)/60) b@1481: plt.xlabel('Page order') b@1481: plt.xlim(.8, len(duration_order)+1) b@1481: plt.xticks(np.arange(1,len(duration_order)+1)+.4, range(1,len(duration_order)+1)) b@1481: plt.ylabel('Average time [minutes]') b@1481: plt.savefig(folder_name+"/time_per_page.pdf", bbox_inches='tight') b@1481: plt.close() b@1481: #TODO add error bars b@1481: b@1481: b@1481: # Sort pages by number of audioelements, then by duration b@1481: b@1481: # average duration and number of subjects per page b@1481: average_duration_page = [] b@1481: number_of_subjects_page = [] b@1481: for line in duration_page: b@1481: number_of_subjects_page.append(len(line)) b@1481: average_duration_page.append(sum(line)/len(line)) b@1481: b@1481: # combine and sort in function of number of audioelements and duration b@1481: combined_list = [page_names, average_duration_page, fragments_per_page, number_of_subjects_page] b@1481: combined_list = sorted(zip(*combined_list), key=operator.itemgetter(1, 2)) # sort b@1481: b@1481: # Show average duration for all songs b@1481: body += r'''\vspace{.5cm} b@1481: Average duration per audioholder (see also Figure \ref{fig:avgtimeperaudioholder}): \\ b@1481: \begin{tabular}{llll} b@1481: \textbf{Audioholder} & \textbf{Duration} & \textbf{\# subjects} & \textbf{\# fragments} \\''' b@1481: audioholder_names_ordered = [] b@1481: average_duration_audioholder_ordered = [] b@1481: number_of_subjects = [] b@1481: for page_index in range(len(page_names)): b@1481: audioholder_names_ordered.append(combined_list[page_index][0]) b@1481: average_duration_audioholder_ordered.append(combined_list[page_index][1]) b@1481: number_of_subjects.append(combined_list[page_index][3]) b@1481: body += '\n\t\t\t'+combined_list[page_index][0] + "&" +\ b@1481: seconds2timestr(combined_list[page_index][1]) + "&" +\ b@1481: str(combined_list[page_index][3]) + "&" +\ b@1481: str(combined_list[page_index][2]) + r"\\" b@1481: body += '\n\t\t\\end{tabular}\n' b@1481: b@1481: # SHOW bar plot of average time per page b@1481: plt.bar(range(1,len(audioholder_names_ordered)+1), np.array(average_duration_audioholder_ordered)/60) b@1481: plt.xlabel('Audioholder') b@1481: plt.xlim(.8, len(audioholder_names_ordered)+1) b@1481: plt.xticks(np.arange(1,len(audioholder_names_ordered)+1)+.4, audioholder_names_ordered, rotation=90) b@1481: plt.ylabel('Average time [minutes]') b@1481: plt.savefig(folder_name+"/time_per_audioholder.pdf", bbox_inches='tight') b@1481: plt.close() b@1481: b@1481: # SHOW bar plot of average time per page b@1481: plt.bar(range(1,len(audioholder_names_ordered)+1), number_of_subjects) b@1481: plt.xlabel('Audioholder') b@1481: plt.xlim(.8, len(audioholder_names_ordered)+1) b@1481: plt.xticks(np.arange(1,len(audioholder_names_ordered)+1)+.4, audioholder_names_ordered, rotation=90) b@1481: plt.ylabel('Number of subjects') b@1481: ax = plt.gca() b@1481: ylims = ax.get_ylim() b@1481: yint = np.arange(int(np.floor(ylims[0])), int(np.ceil(ylims[1]))+1) b@1481: plt.yticks(yint) b@1481: plt.savefig(folder_name+"/subjects_per_audioholder.pdf", bbox_inches='tight') b@1481: plt.close() b@1481: b@1481: # SHOW both figures b@1481: body += r''' b@1481: \begin{figure}[htbp] b@1481: \begin{center} b@1481: \includegraphics[width=.65\textwidth]{'''+\ b@1481: folder_name+"/time_per_page.pdf"+\ b@1481: r'''} b@1481: \caption{Average time spent per page.} b@1481: \label{fig:avgtimeperpage} b@1481: \end{center} b@1481: \end{figure} b@1481: b@1481: ''' b@1481: body += r'''\begin{figure}[htbp] b@1481: \begin{center} b@1481: \includegraphics[width=.65\textwidth]{'''+\ b@1481: folder_name+"/time_per_audioholder.pdf"+\ b@1481: r'''} b@1481: \caption{Average time spent per audioholder.} b@1481: \label{fig:avgtimeperaudioholder} b@1481: \end{center} b@1481: \end{figure} b@1481: b@1481: ''' b@1481: body += r'''\begin{figure}[htbp] b@1481: \begin{center} b@1481: \includegraphics[width=.65\textwidth]{'''+\ b@1481: folder_name+"/subjects_per_audioholder.pdf"+\ b@1481: r'''} b@1481: \caption{Number of subjects per audioholder.} b@1481: \label{fig:subjectsperaudioholder} b@1481: \end{center} b@1481: \end{figure} b@1481: b@1481: ''' b@1481: #TODO add error bars b@1481: #TODO layout of figures b@1481: b@1481: # SHOW boxplot per audioholder b@1481: #TODO order in decreasing order of participants b@1481: for audioholder_name in page_names: # get each name b@1481: # plot boxplot if exists (not so for the 'alt' names) b@1481: if os.path.isfile(folder_name+'/ratings/'+audioholder_name+'-ratings-box.pdf'): b@1481: body += r'''\begin{figure}[htbp] b@1481: \begin{center} b@1481: \includegraphics[width=.65\textwidth]{'''+\ b@1481: folder_name+"/ratings/"+audioholder_name+'-ratings-box.pdf'+\ b@1481: r'''} b@1481: \caption{Box plot of ratings for audioholder '''+\ b@1481: audioholder_name+' ('+str(subject_count[real_page_names.index(audioholder_name)])+\ b@1481: ''' participants).} b@1481: \label{fig:boxplot'''+audioholder_name.replace(" ", "")+'''} b@1481: \end{center} b@1481: \end{figure} b@1481: b@1481: ''' b@1481: b@1481: # DEMO pie chart of gender distribution among subjects b@1481: genders = ['male', 'female', 'other', 'preferNotToSay', 'UNAVAILABLE'] b@1481: # TODO: get the above automatically b@1481: gender_distribution = '' b@1481: for item in genders: b@1481: number = gender.count(item) b@1481: if number>0: b@1481: gender_distribution += str("{:.2f}".format((100.0*number)/len(gender)))+\ b@1481: '/'+item.capitalize()+' ('+str(number)+'),\n' b@1481: b@1481: body += r''' b@1481: % Pie chart of gender distribution b@1481: \def\angle{0} b@1481: \def\radius{3} b@1481: \def\cyclelist{{"orange","blue","red","green"}} b@1481: \newcount\cyclecount \cyclecount=-1 b@1481: \newcount\ind \ind=-1 b@1481: \begin{figure}[htbp] b@1481: \begin{center}\begin{tikzpicture}[nodes = {font=\sffamily}] b@1481: \foreach \percent/\name in {'''+\ b@1481: gender_distribution+\ b@1481: r'''} {\ifx\percent\empty\else % If \percent is empty, do nothing b@1481: \global\advance\cyclecount by 1 % Advance cyclecount b@1481: \global\advance\ind by 1 % Advance list index b@1481: \ifnum6<\cyclecount % If cyclecount is larger than list b@1481: \global\cyclecount=0 % reset cyclecount and b@1481: \global\ind=0 % reset list index b@1481: \fi b@1481: \pgfmathparse{\cyclelist[\the\ind]} % Get color from cycle list b@1481: \edef\color{\pgfmathresult} % and store as \color b@1481: % Draw angle and set labels b@1481: \draw[fill={\color!50},draw={\color}] (0,0) -- (\angle:\radius) b@1481: arc (\angle:\angle+\percent*3.6:\radius) -- cycle; b@1481: \node at (\angle+0.5*\percent*3.6:0.7*\radius) {\percent\,\%}; b@1481: \node[pin=\angle+0.5*\percent*3.6:\name] b@1481: at (\angle+0.5*\percent*3.6:\radius) {}; b@1481: \pgfmathparse{\angle+\percent*3.6} % Advance angle b@1481: \xdef\angle{\pgfmathresult} % and store in \angle b@1481: \fi b@1481: }; b@1481: \end{tikzpicture} b@1481: \caption{Representation of gender across subjects} b@1481: \label{default} b@1481: \end{center} b@1481: \end{figure} b@1481: b@1481: ''' b@1481: # problem: some people entered twice? b@1481: b@1481: #TODO b@1481: # time per page in function of number of fragments (plot) b@1481: # time per participant in function of number of pages b@1481: # plot total time for each participant b@1481: # show 'count' per page (in order) b@1481: b@1481: # clear up page_index <> page_count <> page_number confusion b@1481: b@1481: b@1481: texfile = header+body+footer # add bits together b@1481: b@1481: # write TeX file b@1481: with open(folder_name + '/' + 'Report.tex','w') as f: b@1481: f.write(texfile) b@1481: proc=subprocess.Popen(shlex.split('pdflatex -output-directory='+folder_name+' '+ folder_name + '/Report.tex')) b@1481: proc.communicate() b@1481: # run again b@1481: proc=subprocess.Popen(shlex.split('pdflatex -output-directory='+folder_name+' '+ folder_name + '/Report.tex')) b@1481: proc.communicate() b@1481: b@1481: #TODO remove auxiliary LaTeX files b@1481: try: b@1481: os.remove(folder_name + '/' + 'Report.aux') b@1481: os.remove(folder_name + '/' + 'Report.log') b@1481: os.remove(folder_name + '/' + 'Report.out') b@1481: os.remove(folder_name + '/' + 'Report.toc') b@1481: except OSError: b@1481: pass b@1481: