コード例 #1
0
ファイル: pyhit.py プロジェクト: loganharbour/moose
    def format(self, **kwargs):
        """
        Return a string of the node that is rendered with C hit library with formatting.

        An optional keyword argument *canonical_section_markers* can be supplied with `True` or
        `False` to enable/disable the use of "./" and "../" section markings. By default these
        markings this are removed.
        """
        formatter = hit.Formatter()
        formatter.config(**kwargs)
        formatter.formatTree(self.__hitnode)
        return self.render()
コード例 #2
0
    def format(self, **kwargs):
        """
        Render tree with formatting.

        Inputs:
            canonical_section_markers[bool]: Enable/disable use of "./" and "../" section markings,
                                             by default the markings are removed.
        """
        formatter = hit.Formatter()
        formatter.config(**kwargs)
        formatter.formatTree(self.__hitnode)
        return self.render()