I am trying to create an automated process to convert the USDZ file from a GLTF which requires me to execute the Linux bash command ( usd_from_gltf file1.gltf file1.usdz ) from within a python script.
Note: usd_from_gltf is a Linux bash command working properly in a Linux environment.
I have tried the OS and submodule systems of Python with no luck.
import subprocess
list_files = subprocess.run(["usd_from_gltf", "file1.gltf","file1.usdz"])
print("The exit code was: %d" % list_files.returncode)
import os
os.system(usd_from_gltf file1.gltf file1.usdz)
Which are throwing an unknown error for a module not found.
What I am actually trying to achieve is to run the above command using a python script from a NodeJS backend API environtment.
I am an extreme beginner in Python/Linux bash. any help would be appreciated.
Thanks in advance
question from:
https://stackoverflow.com/questions/65854716/execute-python-command-from-python-script-usd-from-gltf-file1-file2 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…