我想将两个变量传递给另一个python文件,我不想将它作为子进程启动。
我希望两个进程分开运行,因为file1有很多计算要做,并且不能等待file2的操作完成。用变量执行python文件
FILE1.PY
include os
name="one"
status="on"
os.system('F:\PythonSub\file2.py' name status)
FILE2.PY
include sys
name=sys.argv[0]
send=sys.argv[1]
print(send, name)
上面的代码返回
send=sys.argv[1]
IndexError: list index out of range
我到底做错了什么?
的[我怎样才能从异步运行的Python外部命令?(https://stackoverflow.com/questions/636561/how-can-i-run-an可能的复制-external-command-asynchronously-from-python) – hnefatl