Spaces:
Paused
Paused
File size: 705 Bytes
7d5b51d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import sys, os, subprocess, traceback
here = os.path.dirname(os.path.abspath(__file__))
proc = subprocess.Popen(
[sys.executable, os.path.join(here, "bpy_server.py")],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
preexec_fn=os.setsid,
)
try:
stdout, stderr = proc.communicate(timeout=30)
print(f"bpy_server stdout: {stdout.decode()[:500]}")
print(f"bpy_server stderr: {stderr.decode()[:500]}")
print(f"bpy_server returncode: {proc.returncode}")
except subprocess.TimeoutExpired:
proc.kill()
stdout, stderr = proc.communicate()
print(f"bpy_server TIMEOUT - stdout: {stdout.decode()[:500]}")
print(f"bpy_server TIMEOUT - stderr: {stderr.decode()[:500]}")
|