
我终于找到了可行的解决方案。
from subprocess import Popen, PIPE, STDOUTshell_command = 'bash -i -c "history -r; history"'event = Popen(shell_command, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)output = event.communicate()
谢谢大家的投入。
欢迎分享,转载请注明来源:内存溢出

我终于找到了可行的解决方案。
from subprocess import Popen, PIPE, STDOUTshell_command = 'bash -i -c "history -r; history"'event = Popen(shell_command, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)output = event.communicate()
谢谢大家的投入。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)