我在使用 Popen 在 python 中运行外部程序来传递多个变量时遇到问题:
#!/usr/bin/env python
import sys
import os
import shlex, subprocess
a = raw_input("Enter a number:")
b = raw_input("Enter a file:")
c = raw_input("Enter dir to search:")
subprocess.Popen(['/bin/sh', "./catnum.bin", "-m", a, "--remove", "-o results.txt", b, c])