Mercurial > repos > pieterlukasse > nist_wrapper
comparison nist_wrapper.py @ 12:3a69874edaf7
small fix
author | pieter.lukasse@wur.nl |
---|---|
date | Fri, 23 Jan 2015 10:48:21 +0100 |
parents | bde3e4dc4476 |
children | 92cf554fca03 |
comparison
equal
deleted
inserted
replaced
11:a62374fcee9c | 12:3a69874edaf7 |
---|---|
143 | 143 |
144 # kill process: | 144 # kill process: |
145 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that | 145 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that |
146 #stays open...and orphan..killing it: | 146 #stays open...and orphan..killing it: |
147 | 147 |
148 utils.log_message(log_file, "killing wine process...") | |
149 if is_wine: | 148 if is_wine: |
150 # pid = utils.get_process_pid("nistms.exe") | 149 # pid = utils.get_process_pid("nistms.exe") |
151 # os.kill(pid, 9) | 150 # os.kill(pid, 9) |
152 os.killpg(pro.pid, 9) | 151 os.killpg(pro.pid, 9) |
153 else: | 152 else: |
176 html_file = open(output_html_report,'w') | 175 html_file = open(output_html_report,'w') |
177 html_render = ReportGenerator(os.path.dirname(__file__), 'templates/main_template.html',hits_dict, spectra_dict) | 176 html_render = ReportGenerator(os.path.dirname(__file__), 'templates/main_template.html',hits_dict, spectra_dict) |
178 html_render.render(html_file) | 177 html_render.render(html_file) |
179 # copy necessary .js files as well: | 178 # copy necessary .js files as well: |
180 templates_folder = os.path.dirname(__file__) + '/templates/' | 179 templates_folder = os.path.dirname(__file__) + '/templates/' |
181 utils.copy_file(templates_folder + 'spectrum_gen.js', output_html_report_files_path+"/spectrum_gen.js") | 180 #utils.copy_file(templates_folder + 'spectrum_gen.js', output_html_report_files_path+"/spectrum_gen.js") |
182 utils.copy_dir(templates_folder + 'lib', output_html_report_files_path+'/lib' ) | 181 #utils.copy_dir(templates_folder + 'lib', output_html_report_files_path+'/lib' ) |
183 utils.copy_dir(templates_folder + 'images', output_html_report_files_path+'/images' ) | 182 #utils.copy_dir(templates_folder + 'images', output_html_report_files_path+'/images' ) |
183 utils.copy_dir(templates_folder, output_html_report_files_path) | |
184 | 184 |
185 html_file.close() | 185 html_file.close() |
186 | 186 |
187 | 187 |
188 | 188 |