Example #1
0
    def run_sync(self, command):
        command = CrossPlaformCodecs.encode_process_command(command)

        with Dir.cd(self.working_dir):
            self.process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=self.path, shell=True)
            (stdout, stderr) = self.process.communicate()
            self.failed = self.process.returncode == 127 or stderr

        return (CrossPlaformCodecs.force_decode(stdout), CrossPlaformCodecs.force_decode(stderr))
Example #2
0
 def _pipe_stream(self, stream, fn):
     output_text = ""
     while True:
         line = stream.readline()
         if not line: break
         output_line = CrossPlaformCodecs.decode_line(line)
         output_text += output_line
         fn(output_line)
     return output_text
Example #3
0
 def append_to_output_view(self, text):
     if not self.silent:
         decoded_text = text if is_sublime_text_3 else CrossPlaformCodecs.force_decode(text)
         self._insert(self.output_view, decoded_text)
Example #4
0
 def append_to_output_view(self, text):
     if not self.silent:
         decoded_text = text if is_sublime_text_3 else CrossPlaformCodecs.force_decode(
             text)
         self._insert(self.output_view, decoded_text)