old_contents: """Library of command line tools for Squadron Automation."""
  
  import sys
  import argparse
  
  
  VERBOSE = False
  DEBUG = False
  
  
  class PreprocessUI(object):
      """UI Interface for the Preprocessor Command Line tool."""
  
      description = """Squadron Preprocessor Tool."""
  
      def __init__(self, version, verbose=False, debug=False):
          self.parser = argparse.ArgumentParser(description=__doc__)
          self.version = version
          self.built = False
          global VERBOSE
          VERBOSE = verbose
          global DEBUG
          DEBUG = debug
  
      def build(self):
          """Build the argument parser."""
          self.parser.add_argument(
              '--version', help='Print the version and exit.', action='version',
              version='%(prog)s {}'.format(self.version))
          DebugAction.add_parser_argument(self.parser)
          VerboseAction.add_parser_argument(self.parser)
          self.built = True
  
      def parse_cmd_line(self):
          if not self.built:
              self.build()
          return self.parser.parse_args()
  
  
  def dprint(msg):
      """Conditionally print a debug message."""
      if DEBUG:
          print(msg)
  
  
  def vprint(msg):
      """Conditionally print a verbose message."""
      if VERBOSE:
          print(msg)
  
  
  class DebugAction(argparse.Action):
      """Enable the debugging output mechanism."""
  
      flag = '--debug'
      help = 'Enable debugging output.'
  
      @classmethod
      def add_parser_argument(cls, parser):
          parser.add_argument(cls.flag, help=cls.help, action=cls)
  
      def __init__(self, option_strings, dest, **kwargs):
          super(DebugAction, self).__init__(option_strings, dest, nargs=0,
                                            default=False, **kwargs)
  
      def __call__(self, parser, namespace, values, option_string=None):
          print('Enabling debugging output.')
          global DEBUG
          DEBUG = True
          setattr(namespace, self.dest, True)
  
  
  class VerboseAction(DebugAction):
      """Enable the verbose output mechanism."""
  
      flag = '--verbose'
      help = 'Enable verbose output.'
  
      def __call__(self, parser, namespace, values, option_string=None):
          print('Enabling verbose output.')
          global VERBOSE
          VERBOSE = True
          setattr(namespace, self.dest, True)
  
new_contents: """Library of command line tools for Squadron Automation."""
  
  import sys
  import argparse
  
  
  VERBOSE = False
  DEBUG = False
  
  
  class PreprocessUI(object):
      """UI Interface for the Preprocessor Command Line tool."""
  
      description = "A description of the UI tool."
  
      def __init__(self, version, verbose=False, debug=False):
          self.parser = argparse.ArgumentParser(description=__doc__)
          self.version = version
          self.built = False
          global VERBOSE
          VERBOSE = verbose
          global DEBUG
          DEBUG = debug
  
      def build(self):
          """Build the argument parser."""
          self.parser.add_argument(
              '--version', help='Print the version and exit.', action='version',
              version='%(prog)s {}'.format(self.version))
          DebugAction.add_parser_argument(self.parser)
          VerboseAction.add_parser_argument(self.parser)
          self.built = True
  
      def parse_cmd_line(self):
          if not self.built:
              self.build()
          return self.parser.parse_args()
  
  
  def dprint(msg):
      """Conditionally print a debug message."""
      if DEBUG:
          print('dbg:', msg)
  
  
  def vprint(msg):
      """Conditionally print a verbose message."""
      if VERBOSE:
          print(msg)
  
  
  class DebugAction(argparse.Action):
      """Enable the debugging output mechanism."""
  
      shortflag = '-d'
      flag = '--debug'
      help = 'Enable debugging output.'
  
      @classmethod
      def add_parser_argument(cls, parser):
          parser.add_argument(cls.flag, help=cls.help, action=cls)
  
      def __init__(self, option_strings, dest, **kwargs):
          super().__init__(option_strings, dest, nargs=0,
                           default=False, **kwargs)
  
      def __call__(self, parser, namespace, values, option_string=None):
          print('Enabling debugging output.')
          global DEBUG
          DEBUG = True
          setattr(namespace, self.dest, True)
  
  
  class VerboseAction(DebugAction):
      """Enable the verbose output mechanism."""
  
      shortflag = '-v'
      flag = '--verbose'
      help = 'Enable verbose output.'
  
      def __call__(self, parser, namespace, values, option_string=None):
          print('Enabling verbose output.')
          global VERBOSE
          VERBOSE = True
          setattr(namespace, self.dest, True)
  
subject: add short flags for debug and verbose