我是python的初学者,尝试在一个子进程调用中运行多个命令。在
这是我的代码:
import subprocess, sys, time
print ("Python OS 1.0")
print ("Using Python",sys.version)
livecommand = input(">>")
output = subprocess.call(livecommand,'time.sleep(10000.00)',shell=True)
print (output)
错误:
Traceback (most recent call last): File "C:\Users\John\Desktop\OS\FILES\console.py", line 8, in output = subprocess.call(livecommand,'time.sleep(10000.00)',shell=True) File "C:\Users\John\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 267, in call with Popen(*popenargs, **kwargs) as p: File "C:\Users\John\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 607, in init raise TypeError("bufsize must be an integer") TypeError: bufsize must be an integer
目前没有回答
相关问题 更多 >
编程相关推荐