Functions for running external commands in subprocesses.

exception libbe.util.subproc.CommandError(command, status, stdout=None, stderr=None)
libbe.util.subproc.invoke(args, stdin=None, stdout=-1, stderr=-1, expect=(0, ), cwd=None, shell=None, unicode_output=True, verbose=False, encoding=None, **kwargs)

expect should be a tuple of allowed exit codes. cwd should be the directory from which the command will be executed. When unicode_output == True, convert stdout and stdin strings to unicode before returing them.

Previous topic


Next topic


This Page