-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_mesh.py
46 lines (35 loc) · 1.34 KB
/
run_mesh.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# import time
# import subprocess
# cmd = ['echo','arg1','arg2']
# output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
# print(output)
# p1 = subprocess.Popen([".\Meshroom\meshroom_batch.exe", "-i", problem ,"-p",".\PipeLines\Top-part-pipeline.mg"])
# time.sleep(5)
# print("Run mesh was excecuted")
import subprocess
import tempfile
import time
with tempfile.TemporaryFile() as tempf:
proc = subprocess.Popen(['echo', 'a', 'b'], stdout=tempf)
proc.wait()
tempf.seek(0)
p1 = subprocess.Popen([".\Meshroom\meshroom_batch.exe", "-i", problem ,"-p",".\PipeLines\Top-part-pipeline.mg"])
print(tempf.read())
# import time
# import subprocess
# cmd = ['echo','arg1','arg2']
# output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0]
# print(output)
# p1 = subprocess.Popen([".\Meshroom\meshroom_batch.exe", "-i", problem ,"-p",".\PipeLines\Top-part-pipeline.mg"])
# time.sleep(5)
# print("Run mesh was excecuted")
# import subprocess
# import tempfile
# import time
# def start_mesh(problem):
# with tempfile.TemporaryFile() as tempf:
# # proc = subprocess.Popen(['echo', 'a', 'b'], stdout=tempf)
# p1 = subprocess.Popen([".\Meshroom\meshroom_batch.exe", "-i", problem ,"-p",".\PipeLines\Top-part-pipeline.mg"])
# p1.wait()
# tempf.seek(0)
# print(tempf.read())