| 228 | target.write(pipe.read(1)) |
| 229 | |
| 230 | def run(self): |
| 231 | try: |
| 232 | from _pydev_runfiles import pydev_runfiles_parallel_client |
| 233 | # TODO: Support Jython: |
| 234 | # |
| 235 | # For jython, instead of using sys.executable, we should use: |
| 236 | # r'D:\bin\jdk_1_5_09\bin\java.exe', |
| 237 | # '-classpath', |
| 238 | # 'D:/bin/jython-2.2.1/jython.jar', |
| 239 | # 'org.python.util.jython', |
| 240 | |
| 241 | args = [ |
| 242 | sys.executable, |
| 243 | pydev_runfiles_parallel_client.__file__, |
| 244 | str(self.job_id), |
| 245 | str(self.port), |
| 246 | str(self.verbosity), |
| 247 | ] |
| 248 | |
| 249 | if self.coverage_output_file and self.coverage_include: |
| 250 | args.append(self.coverage_output_file) |
| 251 | args.append(self.coverage_include) |
| 252 | |
| 253 | import subprocess |
| 254 | |
| 255 | if False: |
| 256 | proc = subprocess.Popen(args, env=os.environ, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
| 257 | |
| 258 | thread.start_new_thread(self._reader_thread, (proc.stdout, sys.stdout)) |
| 259 | |
| 260 | thread.start_new_thread(target=self._reader_thread, args=(proc.stderr, sys.stderr)) |
| 261 | else: |
| 262 | proc = subprocess.Popen(args, env=os.environ, shell=False) |
| 263 | proc.wait() |
| 264 | |
| 265 | finally: |
| 266 | self.finished = True |