| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Date: | Fri, 04 May 2007 13:54:28 -0400 |
| From: | Jason Tishler <jason AT tishler DOT net> |
| Subject: | Re: popen problems |
| In-reply-to: | <82f04dc40705040736w3fbdb9a8r6fd9b0a9a8f9ee42@mail.gmail.com> |
| To: | cygwin AT cygwin DOT com |
| Mail-followup-to: | cygwin AT cygwin DOT com |
| Message-id: | <20070504175428.GA2556@tishler.net> |
| MIME-version: | 1.0 |
| References: | <82f04dc40705040736w3fbdb9a8r6fd9b0a9a8f9ee42 AT mail DOT gmail DOT com> |
| User-Agent: | Mutt/1.4.2.1i |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
Dan,
On Fri, May 04, 2007 at 09:36:23AM -0500, Dan Armbrust wrote:
> [snip]
> >>>import os.path
> >>>os.popen('ls').readline()
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> OSError: [Errno 13] Permission denied
>
> What on earth happened?
The above indicates that /bin/sh.exe is not executable. I can reproduce
the problem with the following:
$ python -c 'import os; os.popen("ls").readline()' # works
$ chmod -x /bin/sh.exe
$ python -c 'import os; os.popen("ls").readline()' # doesn't work
Traceback (most recent call last):
File "<string>", line 1, in <module>
OSError: [Errno 13] Permission denied
$ chmod +x /bin/sh.exe
$ python -c 'import os; os.popen("ls").readline()' # works again
$
> Any idea how I can fix this?
Make your Cygwin executables and DLLs executable. You may have to use
Windows tools, if chmod is not executable...
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |