Example #1
0
    def to_ocaml_features(self):
        """Populate ocaml features object (defined in snippets) with
        content of this feature object.  This is useful to use the
        high-level Python abilities to read these features from a
        file/string before setting the ocaml features with this data."""

        import ocaml
        for section in self.sections():
            for key, value in self.items(section):
                ocaml.snippets_register_feature(section, key, value)
Example #2
0
    def to_ocaml_features(self):
        """Populate ocaml features object (defined in snippets) with
        content of this feature object.  This is useful to use the
        high-level Python abilities to read these features from a
        file/string before setting the ocaml features with this data."""

        import ocaml
        for section in self.sections():
            for key,value in self.items(section):
                ocaml.snippets_register_feature(section,key,value)
Example #3
0
def update_features(conf):
    import ocaml
    ocaml.snippets_register_feature('file-cache', 'directory',
                                    conf.get('file-cache-directory'))
Example #4
0
    def set(self, section, key, value):
	"""Set key,value - pair in given section"""
        self._must_be_strings('set', [('section', section), ('key', key),
                                      ('value', value)])
        ocaml.snippets_register_feature(section, key, value)
Example #5
0
def update_features(conf):
    import ocaml
    ocaml.snippets_register_feature('file-cache', 'directory',
                                    conf.get('file-cache-directory'))
Example #6
0
 def set(self, section, key, value):
     """Set key,value - pair in given section"""
     self._must_be_strings('set', [('section', section), ('key', key),
                                   ('value', value)])
     ocaml.snippets_register_feature(section, key, value)