[英]passing arguments to x-executable file from within a python script
你應該能夠做到這一點subprocess.Popen
和使用關鍵字參數stdin
與輸入打開文件:
import subprocess
preprocess_path = "file_location"
with open('output.sas', 'r') as f:
proc = subprocess.Popen([preprocess_path], stdin = f)
proc.wait()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.