def doWork(self):
        self.startStatusProgress()
        shell = os.name == 'nt'

        self.appendData("executing: %s\n" % ' '.join(self.command))

        try:
            self.proc = subprocess.Popen(
                self.command,
                shell  = shell,
                stdout = subprocess.PIPE,
                stderr = subprocess.PIPE,
                cwd    = self.workingDir
            )

            if self.proc.stdout:
                thread.start_new_thread(self.readStdOut, ())
            if self.proc.stderr:
                thread.start_new_thread(self.readStdErr, ())

        except Exception:
            e = sys.exc_info()[1]
            msg = "Error: %s" % e
            debug_msg(msg)
            self.appendData(msg)
            self.statusBar.stop = True
            self.statusBar.error = True
            # self.stopStatusProgress()
            thread.start_new_thread(self.statusBar.timedMessage,(msg))
dataset/ETHPy150Open francodacosta/composer-sublime/composer.py/Worker.doWork/original