1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | ''' |
---|
4 | Program to update a DVD jurisdiction 'anuga' directory from the |
---|
5 | original source directory. |
---|
6 | |
---|
7 | usage: update.py <source> |
---|
8 | |
---|
9 | where <source> is one of: |
---|
10 | Hobart |
---|
11 | BatemansBay |
---|
12 | Gosford |
---|
13 | GoldCoast |
---|
14 | ie, the name of one of the DVD jurisdiction staging directories |
---|
15 | (case-insensitive). |
---|
16 | ''' |
---|
17 | |
---|
18 | import os |
---|
19 | import sys |
---|
20 | import shutil |
---|
21 | import time |
---|
22 | |
---|
23 | |
---|
24 | # common base path to all data and project files |
---|
25 | main_path = '/nas/gemd/georisk_models/inundation' |
---|
26 | |
---|
27 | # structures holding data for each jurisdiction |
---|
28 | # data_src_path : sub-path to data directory |
---|
29 | # proj_src_path : sub-path to project files |
---|
30 | # data_dst_path : where to copy data files to |
---|
31 | # proj_dst_path : where to copy project files to |
---|
32 | # copy_data_dirs : data directories to completely copy |
---|
33 | # make_dst_dirs : make these data directories (may be left empty) |
---|
34 | # copy_data_files: individual data files to copy to <data_dst_path> |
---|
35 | # copy_proj_files: individual project files to copy to <proj_dst_path> |
---|
36 | hobart_data = \ |
---|
37 | {'jurisdiction': 'Hobart', # jurisdiction name |
---|
38 | |
---|
39 | # paths to various source directories |
---|
40 | 'data_src_path': 'data/tasmania/hobart_tsunami_scenario_2009/anuga', |
---|
41 | 'arcgis_src_path': 'data/tasmania/hobart_tsunami_scenario_2009/ArcGIS', |
---|
42 | 'viz_src_path': 'data/tasmania/hobart_tsunami_scenario_2009/visualisations', |
---|
43 | 'proj_src_path': 'sandpits/kvanputten/ANUGA/anuga_work/production/hobart_2009/For_DVD', |
---|
44 | 'report_src_path': 'data/four_east_coast_communities_reporting/Professional_opinions_final', |
---|
45 | |
---|
46 | # paths to destination directories (under 'jurisdiction' root) |
---|
47 | 'data_dst_path': 'data/tasmania/hobart_tsunami_scenario_2009/anuga', |
---|
48 | 'proj_dst_path': 'project', |
---|
49 | 'viz_dst_path': 'documents', |
---|
50 | 'arcgis_dst_path': 'data/tasmania/hobart_tsunami_scenario_2009/ArcGIS', |
---|
51 | 'report_dst_path': 'documents', |
---|
52 | |
---|
53 | # copy or create whole directories |
---|
54 | 'make_dst_dirs': ['outputs', 'topographies'], |
---|
55 | 'copy_data_dirs': ['gauges','boundaries', 'polygons'], |
---|
56 | |
---|
57 | # copy 'data' files or directories |
---|
58 | 'copy_data_files': ['outputs/Event1_HAT', |
---|
59 | 'outputs/Event1_MSL', |
---|
60 | 'outputs/Event2_HAT', |
---|
61 | 'outputs/Event2_MSL', |
---|
62 | 'outputs/Event3_MSL', |
---|
63 | 'outputs/Event3_HAT', |
---|
64 | 'outputs/elevation.gdb', |
---|
65 | 'topographies/hobart_combined_elevation.pts', |
---|
66 | 'topographies/hobart_combined_elevation.txt', |
---|
67 | 'topographies/Metadata.pdf'], |
---|
68 | |
---|
69 | # copy 'project' files or directories |
---|
70 | 'copy_proj_files': ['build_elevation.py', 'project.py', 'run_model.py', |
---|
71 | 'export_results_max.py', 'get_timeseries.py', |
---|
72 | 'setup_model.py', 'build_urs_boundary.py', |
---|
73 | 'file_length.py'], |
---|
74 | |
---|
75 | # copy 'visualisations' files or directories |
---|
76 | 'copy_viz_files': ['Figures'], |
---|
77 | |
---|
78 | # copy 'arcgis' files or directories |
---|
79 | 'copy_arc_files': ['Hobart.gdb','Hobart.mxd','layer files'], |
---|
80 | |
---|
81 | # copy 'report' file |
---|
82 | 'copy_report_files': ['professionalopinion_2009_07_TAS_inundation_modelling.pdf'] |
---|
83 | } |
---|
84 | |
---|
85 | batemans_bay_data = \ |
---|
86 | {'jurisdiction': 'BatemansBay', # jurisdiction name |
---|
87 | |
---|
88 | # paths to various source directories |
---|
89 | 'data_src_path': 'data/new_south_wales/batemans_bay_tsunami_scenario_2009/anuga', |
---|
90 | 'arcgis_src_path': 'data/new_south_wales/batemans_bay_tsunami_scenario_2009/ArcGIS', |
---|
91 | 'viz_src_path': 'data/new_south_wales/batemans_bay_tsunami_scenario_2009/visualisations', |
---|
92 | 'proj_src_path': 'sandpits/jgriffin/ANUGA/anuga_work/production/new_south_wales/batemans_bay', |
---|
93 | 'report_src_path': 'data/four_east_coast_communities_reporting/Professional_opinions_final', |
---|
94 | |
---|
95 | # paths to destination directories (under 'jurisdiction' root) |
---|
96 | 'data_dst_path': 'data/new_south_wales/batemans_bay_tsunami_scenario_2009/anuga', |
---|
97 | 'proj_dst_path': 'project', |
---|
98 | 'viz_dst_path': 'documents', |
---|
99 | 'arcgis_dst_path': 'data/new_south_wales/batemans_bay_tsunami_scenario_2009/ArcGIS', |
---|
100 | 'report_dst_path': 'documents', |
---|
101 | |
---|
102 | # copy or create whole directories |
---|
103 | 'make_dst_dirs': ['boundaries', 'meshes', 'outputs', 'topographies'], |
---|
104 | 'copy_data_dirs': ['polygons', 'gauges'], |
---|
105 | |
---|
106 | # copy 'data' files or directories |
---|
107 | 'copy_data_files': ['topographies/batemans_bay_combined_elevation.pts', |
---|
108 | 'topographies/Data_lineage.doc', |
---|
109 | 'outputs/Event1_HAT', |
---|
110 | 'outputs/Event1_MSL', |
---|
111 | 'outputs/Event2_HAT', |
---|
112 | 'outputs/Event2_MSL', |
---|
113 | 'outputs/Event3_MSL', |
---|
114 | 'outputs/Puysegur_200yr', |
---|
115 | 'outputs/Puysegur_500yr', |
---|
116 | 'outputs/Puysegur_1000yr', |
---|
117 | 'outputs/Puysegur_5000yr', |
---|
118 | 'outputs/New_Hebrides_200yr', |
---|
119 | 'outputs/New_Hebrides_500yr', |
---|
120 | 'outputs/New_Hebrides_1000yr', |
---|
121 | 'outputs/New_Hebrides_2000yr', |
---|
122 | 'outputs/New_Hebrides_5000yr', |
---|
123 | 'outputs/elevation', |
---|
124 | 'boundaries/51077', |
---|
125 | 'boundaries/51204', |
---|
126 | 'boundaries/51292', |
---|
127 | 'boundaries/51347', |
---|
128 | 'boundaries/51378', |
---|
129 | 'boundaries/51424', |
---|
130 | 'boundaries/51436', |
---|
131 | 'boundaries/51445', |
---|
132 | 'boundaries/58115', |
---|
133 | 'boundaries/58129', |
---|
134 | 'boundaries/58226', |
---|
135 | 'boundaries/58272', |
---|
136 | 'boundaries/58284', |
---|
137 | 'boundaries/58286', |
---|
138 | 'boundaries/58346', |
---|
139 | 'boundaries/58368', |
---|
140 | 'boundaries/boundaries.gdb', |
---|
141 | 'boundaries/landward_boundary.csv', |
---|
142 | 'boundaries/urs_order.csv' |
---|
143 | ], |
---|
144 | |
---|
145 | # copy 'visualisations' files or directories |
---|
146 | 'copy_viz_files': ['Figures'], |
---|
147 | |
---|
148 | # copy 'project' files or directories |
---|
149 | 'copy_proj_files': ['project.py', 'run_model.py', |
---|
150 | 'setup_model.py', 'build_elevation.py', |
---|
151 | 'export_results_max.py', |
---|
152 | 'file_length.py', 'build_urs_boundary.py'], |
---|
153 | |
---|
154 | # copy 'arcgis' files or directories |
---|
155 | 'copy_arc_files': ['BB_cbd_figure_template.mxd'], |
---|
156 | |
---|
157 | # copy 'report' file |
---|
158 | 'copy_report_files': ['professionalopinion_2009_09_NSW_inundation_modelling.pdf'] |
---|
159 | |
---|
160 | } |
---|
161 | |
---|
162 | gosford_data = \ |
---|
163 | {'jurisdiction': 'Gosford', # jurisdiction name |
---|
164 | |
---|
165 | # paths to various source directories |
---|
166 | 'data_src_path': 'data/new_south_wales/gosford_tsunami_scenario_2009/anuga', |
---|
167 | 'arcgis_src_path': 'data/new_south_wales/gosford_tsunami_scenario_2009/ArcGIS', |
---|
168 | 'viz_src_path': 'data/new_south_wales/gosford_tsunami_scenario_2009/visualisations', |
---|
169 | 'proj_src_path': 'sandpits/jgriffin/ANUGA/anuga_work/production/new_south_wales/gosford', |
---|
170 | 'report_src_path': 'data/four_east_coast_communities_reporting/Professional_opinions_final', |
---|
171 | |
---|
172 | # paths to destination directories (under 'jurisdiction' root) |
---|
173 | 'data_dst_path': 'data/new_south_wales/gosford_tsunami_scenario_2009/anuga', |
---|
174 | 'proj_dst_path': 'project', |
---|
175 | 'viz_dst_path': 'documents', |
---|
176 | 'arcgis_dst_path': 'data/new_south_wales/gosford_tsunami_scenario_2009/ArcGIS', |
---|
177 | 'report_dst_path': 'documents', |
---|
178 | |
---|
179 | # copy or create whole directories |
---|
180 | 'make_dst_dirs': ['boundaries', 'meshes', 'outputs', 'topographies'], |
---|
181 | 'copy_data_dirs': ['polygons', 'gauges'], |
---|
182 | |
---|
183 | # copy 'data' files or directories |
---|
184 | 'copy_data_files': ['topographies/gosford_combined_elevation.pts', |
---|
185 | 'topographies/Data_lineage.doc', |
---|
186 | 'outputs/Event1_HAT', |
---|
187 | 'outputs/Event1_MSL', |
---|
188 | 'outputs/Event2_HAT', |
---|
189 | 'outputs/Event2_MSL', |
---|
190 | 'outputs/Event3_MSL', |
---|
191 | 'outputs/Puysegur_200yr', |
---|
192 | 'outputs/Puysegur_500yr', |
---|
193 | 'outputs/Puysegur_1000yr', |
---|
194 | 'outputs/Puysegur_5000yr', |
---|
195 | 'outputs/elevation', |
---|
196 | 'boundaries/51436', |
---|
197 | 'boundaries/58025', |
---|
198 | 'boundaries/58113', |
---|
199 | 'boundaries/58187', |
---|
200 | 'boundaries/58242', |
---|
201 | 'boundaries/58284', |
---|
202 | 'boundaries/58349', |
---|
203 | 'boundaries/boundaries.gdb', |
---|
204 | 'boundaries/landward_boundary.csv', |
---|
205 | 'boundaries/urs_order.csv' |
---|
206 | ], |
---|
207 | |
---|
208 | # copy 'visualisations' files or directories |
---|
209 | 'copy_viz_files': ['Figures'], |
---|
210 | |
---|
211 | # copy 'project' files or directories |
---|
212 | 'copy_proj_files': ['export_results_max.py', 'file_length.py', |
---|
213 | 'project.py', 'run_model.py', 'build_elevation.py', |
---|
214 | 'get_timeseries.py', 'setup_model.py', |
---|
215 | 'build_urs_boundary.py' |
---|
216 | ], |
---|
217 | |
---|
218 | # copy 'arcgis' files or directories |
---|
219 | 'copy_arc_files': ['G_umina_figure_template.mxd', |
---|
220 | 'avoca_bookmark.dat', |
---|
221 | 'copacabana_bookmark.dat', |
---|
222 | 'terrigal_bookmark.dat', |
---|
223 | 'umina_bookmark.dat'], |
---|
224 | |
---|
225 | # copy 'report' file |
---|
226 | 'copy_report_files': ['professionalopinion_2009_09_NSW_inundation_modelling.pdf'] |
---|
227 | } |
---|
228 | |
---|
229 | gold_coast_data = \ |
---|
230 | {'jurisdiction': 'GoldCoast', # jurisdiction name |
---|
231 | |
---|
232 | # paths to various source directories |
---|
233 | 'data_src_path': 'data/queensland/gold_coast_tsunami_scenario_2009/anuga', |
---|
234 | 'arcgis_src_path': 'data/queensland/gold_coast_tsunami_scenario_2009/ArcGIS', |
---|
235 | 'viz_src_path': 'data/queensland/gold_coast_tsunami_scenario_2009/visualisations', |
---|
236 | 'proj_src_path': 'sandpits/lfountain/anuga_work/production/gold_coast_2009/For_DVD', |
---|
237 | 'report_src_path': 'data/four_east_coast_communities_reporting/Professional_opinions_final', |
---|
238 | |
---|
239 | # paths to destination directories (under 'jurisdiction' root) |
---|
240 | 'data_dst_path': 'data/queensland/gold_coast_tsunami_scenario_2009/anuga', |
---|
241 | 'proj_dst_path': 'project', |
---|
242 | 'viz_dst_path': 'documents', |
---|
243 | 'arcgis_dst_path': 'data/queensland/gold_coast_tsunami_scenario_2009/ArcGIS', |
---|
244 | 'report_dst_path': 'documents', |
---|
245 | |
---|
246 | # copy or create whole directories |
---|
247 | 'make_dst_dirs': ['outputs', 'topographies', 'boundaries'], |
---|
248 | 'copy_data_dirs': ['polygons', 'gauges'], |
---|
249 | |
---|
250 | # copy 'data' files or directories |
---|
251 | 'copy_data_files': ['outputs/Event1_HAT', 'outputs/Event1_MSL', |
---|
252 | 'outputs/Event2_HAT', 'outputs/Event2_MSL', |
---|
253 | 'outputs/Event3_HAT', 'outputs/Event3_MSL', |
---|
254 | 'boundaries/50863', 'boundaries/50994', |
---|
255 | 'boundaries/51253', 'boundaries/51392', |
---|
256 | 'boundaries/51423', 'boundaries/51469', |
---|
257 | 'boundaries/62833','boundaries/events_chosen.xls', |
---|
258 | 'boundaries/landward_boundary.csv', |
---|
259 | 'boundaries/urs_order.csv', |
---|
260 | 'topographies/gold_coast_combined_elevation.pts' |
---|
261 | ], |
---|
262 | |
---|
263 | # copy 'visualisations' files or directories |
---|
264 | 'copy_viz_files': ['Figures'], |
---|
265 | |
---|
266 | # copy 'project' files or directories |
---|
267 | 'copy_proj_files': ['build_elevation.py', 'export_results_max.py', 'file_length.py', |
---|
268 | 'project.py', 'run_model.py', 'setup_model.py', |
---|
269 | 'get_timeseries.py', 'build_urs_boundary.py' |
---|
270 | ], |
---|
271 | |
---|
272 | # copy 'arcgis' files or directories |
---|
273 | 'copy_arc_files': ['gold_coast.mxd', 'gold_coast.gdb'], |
---|
274 | |
---|
275 | # copy 'report' file |
---|
276 | 'copy_report_files': ['professionalopinion_2009_08_QLD_inundation_modelling.pdf'] |
---|
277 | } |
---|
278 | |
---|
279 | # dictionary mapping lower-case jurisdiction name to jurisdiction data dictionary |
---|
280 | source_jurisdiction_path = {'hobart': hobart_data, |
---|
281 | 'batemansbay': batemans_bay_data, |
---|
282 | 'gosford': gosford_data, |
---|
283 | 'goldcoast': gold_coast_data |
---|
284 | } |
---|
285 | |
---|
286 | ###### |
---|
287 | # Routines to automate the script data above. |
---|
288 | ###### |
---|
289 | |
---|
290 | def log(msg=''): |
---|
291 | print(msg) |
---|
292 | |
---|
293 | |
---|
294 | def dir_copy(src, dst): |
---|
295 | cmd = 'cp -R %s %s' % (src, dst) |
---|
296 | log('Doing: %s' % cmd) |
---|
297 | fd = os.popen(cmd) |
---|
298 | fd.close() |
---|
299 | |
---|
300 | def copy_file_or_dir(src, dst): |
---|
301 | '''Copy a file or complete directory.''' |
---|
302 | |
---|
303 | # could be a file or directory being copied |
---|
304 | try: |
---|
305 | shutil.copyfile(src, dst) |
---|
306 | except IOError, e: |
---|
307 | if 'Is a directory' in str(e): |
---|
308 | shutil.copytree(src, dst) |
---|
309 | else: |
---|
310 | log('*' *72) |
---|
311 | log('* %s' % str(e)) |
---|
312 | log('*' *72) |
---|
313 | |
---|
314 | def update_staging(jurisdiction): |
---|
315 | # create a list of jurisdiction names |
---|
316 | jurisdiction_names = [] |
---|
317 | for k in source_jurisdiction_path: |
---|
318 | jurisdiction_names.append(source_jurisdiction_path[k]['jurisdiction']) |
---|
319 | |
---|
320 | # get ready |
---|
321 | j_dict = source_jurisdiction_path[jurisdiction] |
---|
322 | j_name = j_dict['jurisdiction'] |
---|
323 | data_src_path = os.path.join(main_path, j_dict['data_src_path']) |
---|
324 | data_dst_path = os.path.join(os.getcwd(), j_name, j_dict['data_dst_path']) |
---|
325 | proj_src_path = os.path.join(main_path, j_dict['proj_src_path']) |
---|
326 | proj_dst_path = os.path.join(os.getcwd(), j_name, j_dict['proj_dst_path']) |
---|
327 | viz_src_path = os.path.join(main_path, j_dict['viz_src_path']) |
---|
328 | viz_dst_path = os.path.join(os.getcwd(), j_name, j_dict['viz_dst_path']) |
---|
329 | arcgis_src_path = os.path.join(main_path, j_dict['arcgis_src_path']) |
---|
330 | arcgis_dst_path = os.path.join(os.getcwd(), j_name, j_dict['arcgis_dst_path']) |
---|
331 | report_src_path = os.path.join(main_path, j_dict['report_src_path']) |
---|
332 | report_dst_path = os.path.join(os.getcwd(), j_name, j_dict['report_dst_path']) |
---|
333 | |
---|
334 | # tell where all stuff is coming from |
---|
335 | log('Getting data from: %s' % data_src_path) |
---|
336 | log('Getting project from: %s' % proj_src_path) |
---|
337 | log('Getting ArcGIS from: %s' % arcgis_src_path) |
---|
338 | log('Getting report from: %s' % report_src_path) |
---|
339 | log('') |
---|
340 | |
---|
341 | # create new output directory, delete old if there |
---|
342 | if os.path.exists(j_name): |
---|
343 | log('Deleting existing staging directory: %s' % j_name) |
---|
344 | shutil.rmtree(j_name) |
---|
345 | log('Creating staging directory: %s' % j_name) |
---|
346 | os.makedirs(j_name) |
---|
347 | |
---|
348 | # create required directories |
---|
349 | for dir in j_dict['make_dst_dirs']: |
---|
350 | new_dir = os.path.join(data_dst_path, dir) |
---|
351 | log('Creating directory: %s' % dir) |
---|
352 | os.makedirs(new_dir) |
---|
353 | |
---|
354 | # copy required full directories |
---|
355 | for copy_dir in j_dict['copy_data_dirs']: |
---|
356 | src_dir = os.path.join(data_src_path, copy_dir) |
---|
357 | dst_dir = os.path.join(data_dst_path, copy_dir) |
---|
358 | log('Copying directory: %s' % copy_dir) |
---|
359 | copy_file_or_dir(src_dir, dst_dir) |
---|
360 | |
---|
361 | # copy required data files |
---|
362 | for copy_file in j_dict['copy_data_files']: |
---|
363 | src_file = os.path.join(data_src_path, copy_file) |
---|
364 | new_file = os.path.join(data_dst_path, copy_file) |
---|
365 | log('Copying: %s' % copy_file) |
---|
366 | copy_file_or_dir(src_file, new_file) |
---|
367 | |
---|
368 | # copy required visualisation files |
---|
369 | log('Creating directory: %s' % viz_dst_path) |
---|
370 | os.makedirs(viz_dst_path) |
---|
371 | for copy_file in j_dict['copy_viz_files']: |
---|
372 | src_file = os.path.join(viz_src_path, copy_file) |
---|
373 | new_file = os.path.join(viz_dst_path, copy_file) |
---|
374 | log('Copying: %s' % copy_file) |
---|
375 | copy_file_or_dir(src_file, new_file) |
---|
376 | |
---|
377 | # copy required project files |
---|
378 | log('Creating directory: %s' % proj_dst_path) |
---|
379 | os.makedirs(proj_dst_path) |
---|
380 | for copy_file in j_dict['copy_proj_files']: |
---|
381 | src_file = os.path.join(proj_src_path, copy_file) |
---|
382 | new_file = os.path.join(proj_dst_path, copy_file) |
---|
383 | log('Copying: %s' % copy_file) |
---|
384 | copy_file_or_dir(src_file, new_file) |
---|
385 | |
---|
386 | # copy required ArcGIS files |
---|
387 | log('Creating directory: %s' % arcgis_dst_path) |
---|
388 | os.makedirs(arcgis_dst_path) |
---|
389 | for copy_file in j_dict['copy_arc_files']: |
---|
390 | src_file = os.path.join(arcgis_src_path, copy_file) |
---|
391 | new_file = os.path.join(arcgis_dst_path, copy_file) |
---|
392 | log('Copying: %s' % copy_file) |
---|
393 | copy_file_or_dir(src_file, new_file) |
---|
394 | |
---|
395 | # copy report |
---|
396 | log('Creating directory: %s' % report_dst_path) |
---|
397 | for copy_file in j_dict['copy_report_files']: |
---|
398 | src_file = os.path.join(report_src_path, copy_file) |
---|
399 | new_file = os.path.join(report_dst_path, copy_file) |
---|
400 | log('Copying: %s' % copy_file) |
---|
401 | copy_file_or_dir(src_file, new_file) |
---|
402 | |
---|
403 | # now copy jurisdiction-specific DVD files |
---|
404 | src_dir = 'extra_files/%s/*' % j_name |
---|
405 | dst_dir = j_name |
---|
406 | dir_copy(src_dir, dst_dir) |
---|
407 | |
---|
408 | # copy the extra_files and special directories |
---|
409 | src_dir = 'extra_files/browser_files' |
---|
410 | dst_dir = j_name |
---|
411 | dir_copy(src_dir, dst_dir) |
---|
412 | src_dir = 'extra_files/documents' |
---|
413 | dir_copy(src_dir, dst_dir) |
---|
414 | src_file = 'extra_files/autorun.inf' |
---|
415 | dir_copy(src_file, dst_dir) |
---|
416 | src_dir = 'extra_files/.cache' |
---|
417 | dir_copy(src_dir, dst_dir) |
---|
418 | |
---|
419 | # get size of the staging directory |
---|
420 | cmd = 'du -sh %s' % j_name |
---|
421 | fd = os.popen(cmd, 'r') |
---|
422 | res = fd.read() |
---|
423 | fd.close() |
---|
424 | (res, _) = res.split('\t', 1) |
---|
425 | log('Staging directory %s has size %s' % (j_name, res)) |
---|
426 | |
---|
427 | def usage(): |
---|
428 | print('usage: update.py <source>') |
---|
429 | print('where <source> is one of the jurisdiction staging directories.') |
---|
430 | |
---|
431 | if sys.platform == 'win32': |
---|
432 | print('Sorry, you can only run this script under Unix') |
---|
433 | sys.exit(10) |
---|
434 | |
---|
435 | if len(sys.argv) != 2: |
---|
436 | usage() |
---|
437 | sys.exit(10) |
---|
438 | |
---|
439 | jurisdiction = sys.argv[1].lower() |
---|
440 | # remove any trailing '/' - from TAB completion |
---|
441 | if jurisdiction.endswith('/'): |
---|
442 | jurisdiction = jurisdiction[:-1] |
---|
443 | |
---|
444 | start_time = time.time() |
---|
445 | update_staging(jurisdiction) |
---|
446 | stop_time = time.time() |
---|
447 | elapsed_time = stop_time - start_time |
---|
448 | log('Elapsed time is %.1fs' % elapsed_time) |
---|
449 | print 'completed' |
---|