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