code: def main(sniffer_instance=None, test_args=(), progname=sys.argv[0],
           args=sys.argv[1:]):
      
      parser = OptionParser(version="%prog " + __version__)
      parser.add_option('-w', '--wait', dest="wait_time", metavar="TIME",
                        default=0.5, type="float",
                        help="Wait time, in seconds, before possibly rerunning"
                        "tests. (default: %default)")
      parser.add_option('--no-clear', dest="clear_on_run", default=True,
                        action="store_false",
                        help="Disable the clearing of screen")
      parser.add_option('--debug', dest="debug", default=False,
                        action="store_true",
                        help="Enabled debugging output. (default: %default)")
      parser.add_option('-x', '--test-arg', dest="test_args", default=[],
                        action="append",
                        help="Arguments to pass to nose (use multiple times to "
                        "pass multiple arguments.)")
      (options, args) = parser.parse_args(args)
      test_args = test_args + tuple(options.test_args)
  
      if options.debug:
          print("Options:", options)
          print("Test Args:", test_args)
      try:
          print("Starting watch...")
          run(sniffer_instance, options.wait_time, options.clear_on_run,
              test_args, options.debug)
      except KeyboardInterrupt:
          print("Good bye.")
      except Exception:
          import traceback
          traceback.print_exc()
          return sys.exit(1)
      return sys.exit(0)
docs: Runs the program. This is used when you want to run this program standalone.
  
      ``sniffer_instance`` A class (usually subclassed of Sniffer) that hooks into the
                      scanner and handles running the test framework. Defaults to
                      Sniffer instance.
      ``test_args``   This function normally extracts args from ``--test-arg ARG`` command. A
                      preset argument list can be passed. Defaults to an empty tuple.
      ``program``     Program name. Defaults to sys.argv[0].
      ``args``        Command line arguments. Defaults to sys.argv[1:]