0

我的工具有一个 Windows 控制台应用程序。我需要执行登录等命令,连接 e.tc 并需要阅读响应。我怎么能用python做到这一点。我正在使用 python 3.6

4

1 回答 1

0

而不是os在linux中,建议使用subprocessfor windows。

from subprocess import check_output
check_output("dir C:", shell=True)
于 2021-03-03T13:40:27.970 回答