Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create folder to the network computer using os.mkdir() python command on apache?

I am using Win2008 server + Apache2.2 + mod_python. I would make a folder using string value from the web form. It works in local drive

os.mkdir('D:\\temp\\" + folederName)`

But it does not work on network -

os.mkdir('\\\\192.168.131.200\\temp\\" + folederName) 

How can I create a folder to the network computer?

like image 560
Joon Avatar asked Sep 10 '26 23:09

Joon


1 Answers

Wild Guess:

Mount the Share to a Driveletter, so you can access it via Z:\xyz.txt

because the \\\host\path ist not really what can be handled in normal filesystem ops.

EDIT: and please use os.path.join() instead of hardcoding the path stuff :)

like image 91
sleeplessnerd Avatar answered Sep 12 '26 12:09

sleeplessnerd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!