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


Groups > comp.lang.python > #11191

Re: Directions on accessing shared folder in windows network

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <mail@timgolden.me.uk>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'function,': 0.07; 'python': 0.08; 'from:addr:timgolden.me.uk': 0.09; 'from:name:tim golden': 0.09; 'message-id:@timgolden.me.uk': 0.09; 'subject:windows': 0.09; '21:52,': 0.16; 'open()': 0.16; 'paths.': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'subject:folder': 0.16; 'wrote:': 0.16; 'trying': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'itself,': 0.23; 'windows': 0.26; 'tried': 0.26; 'function': 0.27; 'skip:( 40': 0.28; 'problem': 0.28; "he's": 0.29; 'script.': 0.29; 'print': 0.29; 'tjg': 0.30; 'wraps': 0.30; 'shared': 0.31; 'hi,': 0.32; 'anyone': 0.32; 'it.': 0.33; 'to:addr:python-list': 0.33; 'header :User-Agent:1': 0.34; 'file': 0.36; 'using': 0.37; 'but': 0.37; 'open': 0.37; 'web,': 0.38; 'subject:: ': 0.39; 'received:192': 0.39; 'to:addr:python.org': 0.39; 'from:addr:mail': 0.64; 'share': 0.65; 'about?': 0.84; 'mount': 0.84; 'schrieb': 0.84; 'christian,': 0.91; 'open,': 0.91
Date Thu, 11 Aug 2011 08:40:52 +0100
From Tim Golden <mail@timgolden.me.uk>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; 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> <j1uqgp$8ko$1@dough.gmane.org>
In-Reply-To <j1uqgp$8ko$1@dough.gmane.org>
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
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.2157.1313048455.1164.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1313048456 news.xs4all.nl 23877 [2001:888:2000:d::a6]:39333
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:11191

Show key headers only | View raw


On 10/08/2011 21:43, Christian Heimes wrote:
> Am 10.08.2011 21:52, schrieb Ameet Nanda:
>> 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
>
> The open() function wraps the fopen() function, which doesn't support
> UNC, just local paths. You have to mount the network share first (assign
> a drive letter).

Christian, with respect: what are you talking about?

<code>
print open (r"\\localhost\c$\python27\python.exe").read (100)

</code>

The OP's problem is that he's trying to call open () on the
share itself, not on a file within it.

TJG

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


Thread

Re: Directions on accessing shared folder in windows network Tim Golden <mail@timgolden.me.uk> - 2011-08-11 08:40 +0100

csiph-web