3 from tracking.validation.harvesting
import HarvestingModule
11 A wrapper around the svg drawer in the tracking package that
12 writes its output files as a list to the queue
15 def __init__(self, queue=None, label=None, *args, **kwargs):
16 """ The same as the base class, except:
21 queue: The queue to write to
22 label: The key name in the queue
30 CDCSVGDisplayModule.__init__(self, interactive=
False, *args, **kwargs)
42 """ Overwrite the terminate to put the list to the queue"""
43 CDCSVGDisplayModule.terminate(self)
45 files = [file_list[i]
for i
in range(len(file_list))]
50 """ Overwrite the function to listen for every new filename """
51 output_file_name = CDCSVGDisplayModule.new_output_filename(self)
53 return output_file_name
56 def show_image(filename, show=True):
57 """ Display an image file in ipython """
58 from IPython.core.display
import Image, display
60 os.system(
"convert " + filename +
" " + filename[:-3] + str(
"png"))
61 image = Image(filename[:-3] + str(
"png"))
69 """ Wrapper for the HarvestingModule to write its output file name to the queue """
71 def __init__(self, queue, foreach, output_file_name, name=None, title=None, contact=None, expert_level=None):
72 """ The same as the base class except for the queue argument """
73 queue.put(self.__class__.__name__ +
"_output_file_name", output_file_name)
74 HarvestingModule.__init__(self, foreach=foreach,
75 output_file_name=output_file_name,
76 name=name, title=title, contact=contact,
77 expert_level=expert_level)