numpy.distutils.exec_command.exec_command#

distutils.exec_command.exec_command(command, execute_in='', use_shell=None, use_tee=None, _with_python=1, **env)[source]#

Return (status,output) of executed command.

Deprecated since version 1.17: Use subprocess.Popen instead

Parameters:
commandstr

A concatenated string of executable and arguments.

execute_instr

Before running command cd execute_in and after cd -.

use_shell{bool, None}, optional

If True, execute sh -c command. Default None (True)

use_tee{bool, None}, optional

If True use tee. Default None (True)

Returns:
resstr

Both stdout and stderr messages.

Notes

On NT, DOS systems the returned status is correct for external commands. Wild cards will not work for non-posix systems or when use_shell=0.