[Top][All Lists]

[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: Sat, 24 Sep 2005 08:49:05 -0400

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

| Maybe something like
| ${PYTHON} -c '
| from errno import errorcode
| from string import Template, join
| from sys import stdin
| t = Template("#if defned (\$e)\n{ \"$e\", $e, },\n#endif\n")
| errstr = join([t.substitute(e=errorcode[i]) for i in errorcode.keys()])
| for l in stdin:
|     print l.replace("@SYSDEP_ERRNO_LIST@", errstr),
| '

On my system (with Python 2.3.5) This fails for me with the following

  Traceback (most recent call last):
    File "<string>", line 3, in ?
  ImportError: cannot import name Template


reply via email to

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