On 09/08/2011 02:46, Nanda, Ameet wrote:
Hi All,
I was trying to access a network shared folder on a windows network. I
couldn’ t find of a good documentation online to do that. Are there any
recommendations on how to do it in windows. So if my folder is shared as
\\ameetn\Dropbox <file:///\\ameetn\Dropbox> and when I am trying to open
it up, it says I don’t have privileges to open it every time I try doing
that.
>>> open("\\\\ameetn\\Dropbox")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IOError: [Errno 13] Permission denied: '\\\\ameetn\\Dropbox'
Al though I try this from the administrator cmd, I still get the same
error. Can anyone please recommend me a good way to do this.
\\ameetn\Dropbox is a folder. 'open' is for opening files.
If \\ameetn\Dropbox\foo is the path to a file, then:
f = open(r"\\ameetn\Dropbox\foo")
will open it.
--
http://mail.python.org/mailman/listinfo/python-list