It would be good to have a single point to test with automatic shell command escaping.
The logic here is to have a single interface to communicate with the shell, rather that recreating the subprocess object each time.
The function would take a command with arguments, automatically shell-escaping the arguments with shlex (protecting from shell injection). Any additional kwargs will be passed directly to subprocess to override the default arguments.
It would be good to have a single point to test with automatic shell command escaping.
The logic here is to have a single interface to communicate with the shell, rather that recreating the subprocess object each time.
The function would take a command with arguments, automatically shell-escaping the arguments with shlex (protecting from shell injection). Any additional kwargs will be passed directly to subprocess to override the default arguments.
This could be a common function somewhere?