How do I open Windows share with credentials using Python on a Windows machine?
I'm currently doing this:
share = open(r'share@username:password','r')
How do I open Windows share with credentials using Python on a Windows machine?
I'm currently doing this:
share = open(r'share@username:password','r')
i used
subprocess.call(r'net use z: \windows_server\share /user:@username password', shell=True) to mount the share and
subprocess.call(r'net use z: /delete')
to delete it.This is the most hassle free and efficient way. Thanks everyone for the help!!