Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11148

Re: Directions on accessing shared folder in windows network

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'python': 0.08; 'from:addr:python': 0.09; 'ioerror:': 0.09; 'subject:windows': 0.09; "hasn't": 0.15; '[errno': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:84.92': 0.16; 'received:84.92.122': 0.16; 'received:84.92.122.60': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'reply-to:addr :python-list': 0.16; 'subject:folder': 0.16; 'wrote:': 0.16; '>>>': 0.18; '(most': 0.21; 'header:In-Reply-To:1': 0.22; 'permission': 0.24; 'traceback': 0.24; 'windows': 0.26; 'tried': 0.26; 'received:84': 0.28; 'script.': 0.29; "skip:' 10": 0.30; 'shared': 0.31; 'error': 0.32; 'hi,': 0.32; 'anyone': 0.32; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'follows:': 0.34; '2.6': 0.34; 'last):': 0.34; 'reply- to:addr:python.org': 0.34; 'running': 0.35; 'folder': 0.35; 'file': 0.36; 'machine': 0.37; 'using': 0.37; 'but': 0.37; 'skip:o 20': 0.38; 'web,': 0.38; 'subject:: ': 0.39; 'to:addr:python.org': 0.39; 'header:Reply-To:1': 0.71; 'reply-to:no real name:2**0': 0.71; 'denied:': 0.84; 'open,': 0.91
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result AgMIAHrlQk5UXebj/2dsb2JhbABBmDePAneBQAEBBThRCwgQCSUPAjgBDRMIAQGHbL9chkYEmBOLZA
Date Wed, 10 Aug 2011 21:14:05 +0100
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Directions on accessing shared folder in windows network
References <CACo0wzY3xek0ndJCrfUnxHM1LaQAoK1w+DcMifkbSxF=13yvwQ@mail.gmail.com>
In-Reply-To <CACo0wzY3xek0ndJCrfUnxHM1LaQAoK1w+DcMifkbSxF=13yvwQ@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2124.1313007251.1164.python-list@python.org> (permalink)
Lines 31
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1313007251 news.xs4all.nl 23931 [2001:888:2000:d::a6]:60646
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:11148

Show key headers only | View raw


On 10/08/2011 20:52, Ameet Nanda wrote:
> Hi,
>
> Can anyone point me to a way to access windows shared folders from the
> network using a python script. I tried accessing using open, which is
> mentioned to work perfectly on the web, but it gives me following errors
>
>  >>>open(NW_PATH)
>
> it gives me a permission denied error as follows:
>
>  >>> open("\\\\ameetn\\DropBox\\")
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> IOError: [Errno 2] No such file or directory: '\\\\ameetn\\'
>
>  >>> open("\\\\ameetn\\DropBox")
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> IOError: [Errno 13] Permission denied: '\\\\ameetn\\DropBox'
>
> I am running Python 2.6 on Windows 7 platform.
>
"ameetn" is the name of the machine and "DropBox" is the name of a
shared folder on that machine.

The answer hasn't changed.

'open' is for opening _files_.

Give 'open' the path to a _file_.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Directions on accessing shared folder in windows network MRAB <python@mrabarnett.plus.com> - 2011-08-10 21:14 +0100

csiph-web