19 A wrapper around the svg drawer in the tracking package that
20 writes its output files
as a list to the queue
23 def __init__(self, queue=None, label=None, *args, **kwargs):
24 """ The same as the base class, except:
29 queue: The queue to write to
30 label: The key name in the queue
38 CDCSVGDisplayModule.__init__(self, interactive=False, *args, **kwargs)
50 """ Overwrite the terminate to put the list to the queue"""
51 CDCSVGDisplayModule.terminate(self)
53 files = [file_list[i]
for i
in range(len(file_list))]
58 """ Overwrite the function to listen for every new filename """
59 output_file_name = CDCSVGDisplayModule.new_output_filename(self)
61 return output_file_name
64def show_image(filename, show=True):
65 """ Display an image file in ipython """
66 from IPython.core.display
import Image, display
68 os.system(
"convert " + filename +
" " + filename[:-3] +
"png")
69 image = Image(filename[:-3] +
"png")
77 """ Wrapper for the HarvestingModule to write its output file name to the queue """
79 def __init__(self, queue, foreach, output_file_name, name=None, title=None, contact=None, expert_level=None):
80 """ The same as the base class except for the queue argument """
81 queue.put(self.__class__.__name__ +
"_output_file_name", output_file_name)
82 HarvestingModule.__init__(self, foreach=foreach,
83 output_file_name=output_file_name,
84 name=name, title=title, contact=contact,
85 expert_level=expert_level)
label
The label for writing to the queue.
manager
We store the files in a list and this list must be accessible also in multiprocessing,...
def __init__(self, queue=None, label=None, *args, **kwargs)
use_cpp
We want to use cpp for sure.
file_list
The list of created paths.
def new_output_filename(self)
queue
The queue to handle.
def __init__(self, queue, foreach, output_file_name, name=None, title=None, contact=None, expert_level=None)