On Thursday 15 April 2004 13:31, Angus Leeming wrote: > Angus Leeming wrote: > > Any clues? > > Answering myself again (bad habit, I know)... > > def run_command(cmd): > handle = os.popen(cmd, 'r') > cmd_stdout = "" This is unnecessary, as you overwrite it bellow.
> cmd_stdout = string.join(handle.readlines()) > cmd_status = handle.close() > > return cmd_status, cmd_stdout Elegant, isn't it? ;-) PS: Our internal network had several problems so sometimes is difficult to answer asap. :-) -- José Abílio LyX and docbook, a perfect match. :-)