Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
323 views
in Technique[技术] by (71.8m points)

node.js - Execute python command from python script ( usd_from_gltf "file1" "file2" )

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...