コード例 #1
0
    def groupHeaders(self, theFile=globalvars.DATFILE):
        '''
		returns a list of group headers in the rule set
		'''
        headers = []
        if File.Exists(theFile):
            s1 = File.ReadAllLines(theFile)
            s1 = [line for line in s1 if String.StartsWith(line, '#@ GROUP')]
            for line in s1:
                headers.Add(String.Replace(line, '#@ GROUP ', ''))

        return headers
コード例 #2
0
    def test_pythonnet(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")
        if sys.platform.startswith("win"):
            from src.ensae_teaching_cs.pythonnet import clr
            from System import String
            s = String("example")
            x = s.Replace("e", "j")
            assert "jxamplj" == x

            from System.Collections.Generic import Dictionary
            d = Dictionary[String, String]()
            d["un"] = "1"
            assert d.Count == 1