Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的工具有一个 Windows 控制台应用程序。我需要执行登录等命令,连接 e.tc 并需要阅读响应。我怎么能用python做到这一点。我正在使用 python 3.6
而不是os在linux中,建议使用subprocessfor windows。
os
subprocess
from subprocess import check_output check_output("dir C:", shell=True)