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: 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 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: In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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? print open (r"\\localhost\c$\python27\python.exe").read (100) The OP's problem is that he's trying to call open () on the share itself, not on a file within it. TJG