Exeucte a system command in python script
robert.kern at gmail.com
Fri Jun 9 03:25:10 CEST 2006
ken.carlino at gmail.com wrote:
> I would like to execute a shell command like this in python:
> cmd = 'ant release -Dbuild=build_proxyonly -Drev=5.1.130f
> Which of the execl command described here should I use?
None. You should use the subprocess module in 2.4 (I really do hope that you're
not using 1.6).
It also works in Pythons as old as 2.2, but you'll have to install it
separately. The website for the separate release is down at the moment, but when
it comes back up:
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list