(command)
| 5 | |
| 6 | |
| 7 | def run_subprocess(command): |
| 8 | try: |
| 9 | process = subprocess.Popen(command, |
| 10 | stdout=subprocess.PIPE, |
| 11 | stderr=subprocess.PIPE, |
| 12 | universal_newlines=True) |
| 13 | |
| 14 | # Read output and error in real-time |
| 15 | for line in process.stdout: |
| 16 | print(line.strip()) |
| 17 | for line in process.stderr: |
| 18 | print(line.strip()) |
| 19 | |
| 20 | # Wait for the subprocess to finish |
| 21 | process.wait() |
| 22 | |
| 23 | # Get the return code |
| 24 | return_code = process.returncode |
| 25 | |
| 26 | if return_code != 0: |
| 27 | print(f'Command failed with return code {return_code}') |
| 28 | |
| 29 | except subprocess.CalledProcessError as e: |
| 30 | print(f'Command failed with return code {e.returncode}') |
| 31 | print('Error output:') |
| 32 | print(e.output.decode()) |
| 33 | |
| 34 | |
| 35 | def pytorch3d_links(): |
no outgoing calls
no test coverage detected