module

biopipen.utils.misc

Functions
  • run_command(cmd, fg, wait, print_command, print_command_handler, **kwargs) Run a command.</>
function

biopipen.utils.misc.run_command(cmd, fg=False, wait=True, print_command=True, print_command_handler=<built-in function print>, **kwargs)

Run a command.

Parameters
  • cmd (Union) A string or list of strings representing the command to run.
  • fg (bool, optional) Whether to run the command in the foreground.Redirects stdout and stderr to the current process.
  • wait (bool, optional) Whether to wait for the command to finish.The command will be waited for if fg is True.
  • print_command (bool, optional) Whether to print the command before running it.
  • print_command_handler (callable, optional) The function to use to print the command.
  • kwargs Keyword arguments to pass to subprocess.Popen.
Returns

The Popen object, or str when stdout is RETURN or return.