class_docstr: Executes shell commands in response to matched events.
class_docstr_tok: ["Executes","shell","commands","in","response","to","matched","events","."]
code: def __init__(
      self,
      shell_command=None,
      patterns=None,
      ignore_patterns=None,
      ignore_directories=False,
      wait_for_process=False,
      drop_during_process=False,
  ):
      super(ShellCommandTrick, self).__init__(
          patterns, ignore_patterns, ignore_directories
      )
      self.shell_command = shell_command
      self.wait_for_process = wait_for_process
      self.drop_during_process = drop_during_process
      self.process = None
  
imports: import os
  import signal
  import subprocess
  import time
  from wandb_watchdog.utils import echo, has_attribute
  from wandb_watchdog.events import PatternMatchingEventHandler
label_desc: Use image node_id 1 to create a new ShellCommandTrick object from inherited base classes: Trick with example: obj = ShellCommandTrick(shell_command, patterns, ignore_patterns, ignore_directories, wait_for_process, drop_during_process)