get pid from popen3 or get redirection in execl
Yu Wang
Yu.Wang at synopsys.com
Thu Apr 17 04:04:51 EDT 2003
Sorry for this stupid question. I've found at least two ways to resolve it.
use sys.stderr, and dup2() function both work for it.
Yu Wang wrote:
> Hi,all
> Does "execl", or whatever this family, support redirection of output?
> Say, I have a script: ( on my Linux7.2,C shell environment,with
> python2.2.1)
>
> command="somecommand"
> arg="-i somefile > output file"
> execl(command,arg)
>
> what's wrong with this?
>
> And,
> how could I get child pid from "popen3(somecommand)".
>
> Thanks to you.
> Regards.
>
>
More information about the Python-list
mailing list