This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: popen problems
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/