#! /usr/bin/env python
# -*- coding: utf-8 -*-

#import sys
#sys.path.append ("/usr/lib")
import faster_module_path

from optparse        import OptionParser
from crrc4_caras_one import CRRC4_CARAS_One



if (__name__ == "__main__"):

  usage = "usage:\n   %prog --help\n   %prog [options] filename.cfg\n"

  parser = OptionParser(usage)

  parser.add_option("-c", "--ch_num", type="int", dest="ch_num", default=0, help="Channel number [1|2] in single channel mode")
  parser.add_option("-f", "--fixed-label", action="store_true", dest="fixed_label", default=False, help="Labels aren't editable.")
  parser.add_option("-t", "--title", dest="title", default="CRRC4 Spectro CARAS One", help="Title of the window.")
  parser.add_option("--ch1_title", dest="ch1_title", default="Spectro 1 ", help="Name of channel 1.")
  parser.add_option("--ch2_title", dest="ch2_title", default="Spectro 2 ", help="Name of channel 2.")

  (options, args) = parser.parse_args()

  if len(args) != 1:
    parser.error("incorrect number of arguments")

  ihm = CRRC4_CARAS_One (args[0],
                         singleChannel = options.ch_num,
                         title         = options.title,
                         title_ch1     = options.ch1_title,
                         title_ch2     = options.ch2_title,
                         fixed_label   = options.fixed_label,
                         forceCounters = False)

  ihm.mainloop()

#
