Ejemplo n.º 1
0
    def __init__(self):
        conf = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())

        if not _fileExist(file_conf):
            print("File configuration %s not found!" % (file_conf))
            conf = None
        else:
            conf.read(file_conf)
            conf = self.parser_conf_init(conf, 'Os', 'path_join', _pathSep())
            conf = self.parser_conf_init(conf, 'Os', 'path_home', _pathExpanduser('~'))

        self.conf = conf
Ejemplo n.º 2
0
    if args.debug:
        for sheet_first in sheet_group:
            logs.info('___________')
            logs.info('Group     [%s]' % sheet_first)
            for sheet_name in sheet_group[sheet_first]:
                logs.info('     Sheet[%s]' % sheet_name)
    # ------------------------------------------------------------------------------------------------------------------

    try:
        for sheet_first in sheet_group:
            logs.info('___________')
            logs.info('Group     [%s]' % sheet_first)

            name_output = _replace(name_input, '.xls',
                                   (' # %s.xls' % sheet_first))
            file_output = path_split + _pathSep() + name_output

            _copy2(file_input, file_output)

            workbook_output = None
            workbook_outxls = None
            if xlsx_ext:
                workbook_output = open_file_xlsx(file_output)
            else:
                workbook_output = open_file_xls_(file_output)
                workbook_outxls = copy.copy(workbook_output)

            for sheet_name_ in sheet_names:
                sheet_keep = sheet_puorg.get(sheet_name_, '')
                if sheet_first == sheet_keep:
                    logs.info('  ++ Sheet[%s]' % sheet_name_)