the previous posts have covered everything necessary, but i thought
i'd say, I agree with Chris...  subprocess's Popen and PIPE make for
very simple, elegant external command access, though a knowledge of
the way popen3 works will help you understand what Popen is really
doing for you.

at a very simple level, this is what you're doing with either one
## command here already has args += with command, for convenience
## popen3
(p_in, p_out, p_err) = os.popen3(command)
## Popen
p = Popen(command, shell=True, close_fds=True, stderr=PIPE,
stdin=PIPE, stdout=PIPE)
error =

On 6/8/06, Chris Withers <[EMAIL PROTECTED]> wrote:
Stephan Richter wrote:
> Use Python popen or popen3. It allows you to execute shell comands. As the
> other response suggests, you can use "sudo" or "su" to become root.

Actually, since Zope 3 uses Python 2.4, you have access to the wonderful
subprocess module, which I'd thoroughly recommend :-)


Simplistix - Content Management, Zope & Python Consulting

Zope3-users mailing list

Zope3-users mailing list

Reply via email to