Getting a process's output [solved]
Gerrit Holl
gerrit at nl.linux.org
Tue Jan 20 06:41:02 EST 2004
Dietrich Epp wrote:
> On Jan 19, 2004, at 2:13 PM, Gerrit Holl wrote:
> >Try commands.getstatusoutput() or the various popen functions.
>
> Thanks, although getstatusoutput requires arguments to be quoted. I
> looked at the source code to getstatusoutput() and popen() to come up
> with a replacement which doesn't need quoted arguments and doesn't
> create a shell. I don't think it portable, and it will undoubtedly do
> something very nasty if one of the system calls should fail. I think
> this would be very cool in the library (the function, not its
> deficiencies).
You may want to have a look at PEP 324, about a new process module:
http://www.python.org/peps/pep-0324.html
yours,
Gerrit.
--
20. If the slave that he caught run away from him, then shall he swear
to the owners of the slave, and he is free of all blame.
-- 1780 BC, Hammurabi, Code of Law
--
PrePEP: Builtin path type
http://people.nl.linux.org/~gerrit/creaties/path/pep-xxxx.html
Asperger's Syndrome - a personal approach:
http://people.nl.linux.org/~gerrit/english/
More information about the Python-list
mailing list