MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / run_subprocess

Function run_subprocess

install.py:7–32  ·  view source on GitHub ↗
(command)

Source from the content-addressed store, hash-verified

5
6
7def 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
35def pytorch3d_links():

Callers 2

install_packageFunction · 0.85
install.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected