def main(argv=None):
  # Allow Ctrl-C
  signal.signal(signal.SIGINT, signal.SIG_DFL)

  parser = OptionParser()
  parser.add_option('-v', '--verbose',
    dest='verbose',
    default=False,
    action='store_true',
    help='Verbose logging. (default: %default)')
  parser.add_option('-s', '--servers',
    dest='servers',
    default='localhost:2181',
    help='Comma-separated list of host:port pairs. (default: %default)')

  (options, args) = parser.parse_args()

  if options.verbose:
    logger.setLevel(logging.DEBUG)
  else:
    logger.setLevel(logging.INFO)

  formatter = logging.Formatter("%(asctime)s %(filename)s:%(lineno)d - %(message)s")
  stream_handler = logging.StreamHandler()
  stream_handler.setFormatter(formatter)
  logger.addHandler(stream_handler)

  logger.info('Starting Zookeeper python example: %s' % ' '.join(sys.argv))

  mc = MyClass(options, args)
  mc.start()
  mc.join()
dataset/ETHPy150Open francelabs/datafari/debian7/zookeeper/contrib/zkpython/src/examples/watch_znode_for_changes.py/main/original