def run(self):
     res = workerManager.SubmitSubProcess(os.path.abspath(os.path.join(__file__, "../sub")))
     res.result()
     for l in res.outputs():
         print(l)
     for l in res.errors():
         print(l)
Esempio n. 2
0
    def process(self):
        cmd_p = self.input("command").receive()
        if cmd_p.isEOP():
            return False

        cmd = cmd_p.value()
        cmd_p.drop()

        sp = workerManager.SubmitSubProcess(cmd)
        self.output("result").send(sp.result())

        return True
Esempio n. 3
0
    def process(self):
        if not self.__in_col_eop:
            inc = self.input("inColorspace").receive()
            if inc.isEOP():
                self.__in_col_eop = True
            else:
                self.__in_col = inc.value()

        if self.__in_col is None:
            return False

        if not self.__out_col_eop:
            outc = self.input("outColorspace").receive()
            if outc.isEOP():
                self.__out_col_eop = True
            else:
                self.__out_col = outc.value()

        if self.__out_col is None:
            return False

        in_p = self.input("inImage").receive()
        if in_p.isEOP():
            return False

        in_i = in_p.value()
        in_p.drop()

        out_p = self.input("outImage").receive()
        if out_p.isEOP():
            return False

        out_i = out_p.value()
        out_p.drop()

        cmd = 'maketx -o "{outImage}" -colorconvert {inColorspace} {outColorspace} "{inImage}"'.format(
            outImage=out_i,
            inImage=in_i,
            inColorspace=self.__in_col,
            outColorspace=self.__out_col)

        self.debug(cmd)
        res = workerManager.SubmitSubProcess(cmd)

        self.output("result").send(res.result())

        return True
Esempio n. 4
0
 def run(self):
     res = workerManager.SubmitSubProcess(
         os.path.abspath(os.path.join(__file__, "../sub")))
     res.result()