コード例 #1
0
 def addFileRegexps(self,fName):
     """Adds the lines from a file to the custom regular expressions
     :param fName: The name of the file"""
     f=open(fName)
     txt=f.read()
     f.close()
     self.lines_+=readCustomPlotInfo(txt)
コード例 #2
0
ファイル: CommonPlotLines.py プロジェクト: LeeRuns/PyFoam
 def addFileRegexps(self,fName):
     """Adds the lines from a file to the custom regular expressions
     @param fName: The name of the file"""
     f=open(fName)
     txt=f.read()
     f.close()
     self.lines_+=readCustomPlotInfo(txt)
コード例 #3
0
 def addPlotLines(self,lines,name=None):
     """Adds a list of lines"""
     if lines:
         for i,l in enumerate(lines):
             if name:
                 useName="%s_%i" % (name,i)
             else:
                 useName=None
             self.lines_+=readCustomPlotInfo(l,useName=useName)
コード例 #4
0
ファイル: CommonPlotLines.py プロジェクト: LeeRuns/PyFoam
 def addPlotLines(self,lines,name=None):
     """Adds a list of lines"""
     if lines:
         for i,l in enumerate(lines):
             if name:
                 useName="%s_%i" % (name,i)
             else:
                 useName=None
             self.lines_+=readCustomPlotInfo(l,useName=useName)
コード例 #5
0
 def addPlotLine(self,line):
     """Add a single line"""
     self.lines_+=readCustomPlotInfo(line)
コード例 #6
0
 def testNewStyle(self):
     ci = readCustomPlotInfo(newStyle)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(newStyle2)
     self.assertEqual(len(ci), 2)
コード例 #7
0
 def testPyDictRegexp(self):
     ci = readCustomPlotInfo(pyDictRegexp)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(pyDictRegexp2)
     self.assertEqual(len(ci), 2)
コード例 #8
0
 def testPureRegex(self):
     ci = readCustomPlotInfo(pureRegexp)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(pureRegexp2)
     self.assertEqual(len(ci), 2)
コード例 #9
0
ファイル: CommonPlotLines.py プロジェクト: LeeRuns/PyFoam
 def addPlotLine(self,line):
     """Add a single line"""
     self.lines_+=readCustomPlotInfo(line)
コード例 #10
0
ファイル: CustomPlotInfo.py プロジェクト: LeeRuns/PyFoam
 def testNewStyle(self):
     ci=readCustomPlotInfo(newStyle)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(newStyle2)
     self.assertEqual(len(ci),2)
コード例 #11
0
ファイル: CustomPlotInfo.py プロジェクト: LeeRuns/PyFoam
 def testPyDictRegexp(self):
     ci=readCustomPlotInfo(pyDictRegexp)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(pyDictRegexp2)
     self.assertEqual(len(ci),2)
コード例 #12
0
ファイル: CustomPlotInfo.py プロジェクト: LeeRuns/PyFoam
 def testPureRegex(self):
     ci=readCustomPlotInfo(pureRegexp)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(pureRegexp2)
     self.assertEqual(len(ci),2)