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)
Exemple #2
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)
 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)
Exemple #4
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)
 def addPlotLine(self,line):
     """Add a single line"""
     self.lines_+=readCustomPlotInfo(line)
 def testNewStyle(self):
     ci = readCustomPlotInfo(newStyle)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(newStyle2)
     self.assertEqual(len(ci), 2)
 def testPyDictRegexp(self):
     ci = readCustomPlotInfo(pyDictRegexp)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(pyDictRegexp2)
     self.assertEqual(len(ci), 2)
 def testPureRegex(self):
     ci = readCustomPlotInfo(pureRegexp)
     self.assertEqual(len(ci), 1)
     ci = readCustomPlotInfo(pureRegexp2)
     self.assertEqual(len(ci), 2)
Exemple #9
0
 def addPlotLine(self,line):
     """Add a single line"""
     self.lines_+=readCustomPlotInfo(line)
Exemple #10
0
 def testNewStyle(self):
     ci=readCustomPlotInfo(newStyle)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(newStyle2)
     self.assertEqual(len(ci),2)
Exemple #11
0
 def testPyDictRegexp(self):
     ci=readCustomPlotInfo(pyDictRegexp)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(pyDictRegexp2)
     self.assertEqual(len(ci),2)
Exemple #12
0
 def testPureRegex(self):
     ci=readCustomPlotInfo(pureRegexp)
     self.assertEqual(len(ci),1)
     ci=readCustomPlotInfo(pureRegexp2)
     self.assertEqual(len(ci),2)