Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
305 B
0
Indexable
Never
class MyProcess(multiprocessing.Process):
    def __init__(self, target, args=(), kwargs=None, env=None):
        super().__init__(target=target, args=args, kwargs=kwargs)
        self.env = env

    def run(self):
        if self.env:
            os.environ.update(self.env)
        super().run()