Linuxボックスでcallコマンドを使用してPythonスクリプトから「そのまま」実行しようとしている同等のシェルコマンド(以下に表示)があり、コンパイルエラーが発生します。このコマンドをruntするための呼び出し以外のより良い方法はありますか?どこが間違っているのですか?
from subprocess import call
def main ():
#ssh -p 29418 company.com gerrit query --commit-message --files --current-patch-set status:open project:platform/vendor/company-proprietary/wlan branch:master |grep refs| awk -F ' ' {'print $2'} |tee refspecs.txt
call (["ssh -p 29418 company.com gerrit query", "--commit-message", "--files", "--current-patch-set", "status:open project:platform/vendor/company-proprietary/wlan branch:master","|grep refs| awk -F ' ' {'print $2'} |tee refspecs.txt")]
if __name__ == '__main__':
main()