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