コード例 #1
0
def main():
  parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
  normal_grp = parser.add_option_group("Normal")
  expert_grp = parser.add_option_group("Expert")
  resource_manager.add_options(normal_grp,expert_grp)
  (options, args) = parser.parse_args()

  logger = logging.getLogger("mber")
  logger.setLevel(logging.DEBUG)

  #logfilename = "berlog_" + strftime("%Y%m%d%H%M%S",gmtime()) + ".log"


  #fh = logging.FileHandler(logfilename)
  #fh.setLevel(logging.DEBUG)

  ch = logging.StreamHandler()
  ch.setLevel(logging.DEBUG)

  formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
  #fh.setFormatter(formatter)
  ch.setFormatter(formatter)

  #logger.addHandler(fh)
  logger.addHandler(ch)

  #logger.info("Log filename is %s" %(logfilename))


  start_resource_manager(resource_manager, "PA",options)
コード例 #2
0
ファイル: rm_exercise_1_2.py プロジェクト: luwangg/gr-ofdm-1
def main():
    parser = OptionParser(option_class=eng_option, conflict_handler="resolve")
    normal_grp = parser.add_option_group("Normal")
    expert_grp = parser.add_option_group("Expert")
    resource_manager.add_options(normal_grp, expert_grp)
    (options, args) = parser.parse_args()

    logger = logging.getLogger("mber")
    logger.setLevel(logging.DEBUG)

    #logfilename = "berlog_" + strftime("%Y%m%d%H%M%S",gmtime()) + ".log"

    #fh = logging.FileHandler(logfilename)
    #fh.setLevel(logging.DEBUG)

    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)

    formatter = logging.Formatter(
        "%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    #fh.setFormatter(formatter)
    ch.setFormatter(formatter)

    #logger.addHandler(fh)
    logger.addHandler(ch)

    #logger.info("Log filename is %s" %(logfilename))

    start_resource_manager(resource_manager, "PA", options)
コード例 #3
0
def main():
    logger = logging.getLogger("suw")
    logger.setLevel(logging.DEBUG)

    #  logfilename = "suw_" + strftime("%Y%m%d%H%M%S",gmtime()) + ".log"

    #  fh = logging.FileHandler(logfilename)
    #  fh.setLevel(logging.DEBUG)

    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)

    #  formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    #  fh.setFormatter(formatter)
    #  ch.setFormatter(formatter)

    #  logger.addHandler(fh)
    logger.addHandler(ch)

    #  logger.info("Log filename is %s" %(logfilename))

    parser = OptionParser(conflict_handler="resolve")

    expert_grp = parser.add_option_group("Expert")

    resource_manager.add_options(parser, expert_grp)

    parser.add_option(
        "-c",
        "--cfg",
        action="store",
        type="string",
        default=None,
        help="Specifiy configuration file, default: none",
        config="false",
    )

    (options, args) = parser.parse_args()

    if options.cfg is not None:
        (options, args) = parser.parse_args(files=[options.cfg])
        print "Using configuration file %s" % (options.cfg)

    start_resource_manager(resource_manager, "PA", options)
コード例 #4
0
def main():
    logger = logging.getLogger("suw")
    logger.setLevel(logging.DEBUG)

    #  logfilename = "suw_" + strftime("%Y%m%d%H%M%S",gmtime()) + ".log"

    #  fh = logging.FileHandler(logfilename)
    #  fh.setLevel(logging.DEBUG)

    ch = logging.StreamHandler()
    ch.setLevel(logging.DEBUG)

    #  formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
    #  fh.setFormatter(formatter)
    #  ch.setFormatter(formatter)

    #  logger.addHandler(fh)
    logger.addHandler(ch)

    #  logger.info("Log filename is %s" %(logfilename))

    parser = OptionParser(conflict_handler="resolve")

    expert_grp = parser.add_option_group("Expert")

    resource_manager.add_options(parser, expert_grp)

    parser.add_option("-c",
                      "--cfg",
                      action="store",
                      type="string",
                      default=None,
                      help="Specifiy configuration file, default: none",
                      config="false")

    (options, args) = parser.parse_args()

    if options.cfg is not None:
        (options, args) = parser.parse_args(files=[options.cfg])
        print "Using configuration file %s" % (options.cfg)

    start_resource_manager(resource_manager, "PA", options)
コード例 #5
0
def main():
    start_resource_manager(resource_manager, "PA")
コード例 #6
0
def main():
    start_resource_manager(rm_old_implementation, "PA")
コード例 #7
0
def main():
    start_resource_manager(resource_manager, "PA")
コード例 #8
0
ファイル: resource_manager.py プロジェクト: rwth-ti/gr-ofdm
def main():
    start_resource_manager(rm_old_implementation, "PA")