octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: popen2 example gives no output


From: John W. Eaton
Subject: Re: popen2 example gives no output
Date: Fri, 14 Oct 2005 03:30:21 -0400

On 24-Sep-2005, Stefan van der Walt wrote:

| Yes, this is a Python 2.4 feature.  You can do something like
| 
| PYTHON=python
| 
| ${PYTHON} -c '
| from errno import errorcode
| from string import Template, join
| from sys import stdin
| 
| t = "#if defined (\%s)\n{ \"%s\", %s, },\n#endif\n"
| errstr = ""
| for k in errorcode.keys():
|     errstr += t % tuple(3*[errorcode[k]])
| 
| for l in stdin:
|     print l.replace("@SYSDEP_ERRNO_LIST@", errstr),
| '

I added this as another possible way to generate the list of errno
codes.

Thanks,

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]