Python 3.4, Django 1.7, Windows apache 2.4.12
I try to list all the files on a shared Windows drive (which is limited to specific users), and then write a couple of files to a shared drive.
I am using os.listdir for this. It works well if I just run the web application on my machine, but after it is deployed to the server itself, it will stop working.
The problem is the resolution on the Windows shared drive. The user must first log in so that I have a username and password.
My question is how to specify os.listdir username and password?
I tried os.listdir ('// windows / share / drive / dir @ domanin / username: password'), but the system will try to find the file instead of passing the username and password.
Does anyone know how to solve this? Or do I need to map a drive (how do I match a drive with credentials?), View files, burn files, and then disconnect the mapped drive?
Thank you very much.
source share