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 机器上使用 Python 打开带有凭据的 Windows 共享?
我目前正在这样做:
share = open(r'share@username:password','r')
我用了
subprocess.call(r'net use z: \windows_server\share /user:@username password', shell=True) 挂载共享和
subprocess.call(r'net use z: /delete')
删除它。这是最省事和最有效的方法。谢谢大家的帮助!!