Esempio n. 1
0
 def __init__(self, case_root, infile):
     fullpath = os.path.join(case_root, infile)
     EntryID.__init__(self, fullpath)
     if (not os.path.isfile(fullpath)):
         headerobj = Headers()
         headernode = headerobj.get_header_node(os.path.basename(fullpath))
         self.root.append(headernode)
Esempio n. 2
0
    def __init__(self):
        """
        initialize an object

        >>> files = Files()
        >>> files.get_value('CASEFILE_HEADERS',resolved=False)
        '$CIMEROOT/cime_config/config_headers.xml'
        """
        infile = os.path.join(get_cime_root(),"cime_config",get_model(),"config_files.xml")
        EntryID.__init__(self,infile)
Esempio n. 3
0
    def __init__(self,infile=None):
        """
        initialize an object

        >>> files = Files()
        >>> files.get_value('CASEFILE_HEADERS',resolved=False)
        '$CIMEROOT/cime_config/config_headers.xml'
        """
        if(infile is None):
            files = Files()
            infile = files.get_value('CASEFILE_HEADERS',resolved=True)
        EntryID.__init__(self,infile)
Esempio n. 4
0
 def __init__(self,infile):
     """
     initialize an object
     """
     EntryID.__init__(self,infile)