os.system
사용
import os
os.system(f"tar -xvf {ipk_path} -C {output_dir}")
subprocess.Popen
사용
import subprocess
res = subprocess.Popen(f"tar -xvf {ipk_path} -C {output_dir}", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
if res.wait() != 0:
_, error = res.communicate()
print(error)
else:
print('ok')