bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def dumpXPreformattedLines(P): print 'dumpXPreforemattedLines(%s)' % str(P) lines = P.bfrags.lines n =len(lines) for l in range(n): line = lines[l] words = line.words nwords = len(words) print 'line%d: %d(%d)\n ' % (l,nwords,line.wordCount), for w in range(nwords): print "%d:'%s'"%(w,words[w].text), print | def dumpXPreformattedLines(P): print '\n lines = P.bfrags.lines n =len(lines) for l in range(n): line = lines[l] words = line.words nwords = len(words) print 'line%d: %d(%d)\n ' % (l,nwords,line.wordCount), for w in range(nwords): print "%d:'%s'"%(w,words[w].text), print | 4,600 |
def dumpXPreformattedFrags(P): print 'dumpXPreforemattedFrags(%s)' % str(P) frags = P.frags n =len(frags) for l in range(n): print "frag%d: '%s'" % (l, frags[l].text) l = 0 for L in _getFragLines(frags): n=0 for W in _getFragWords(L): print "frag%d.%d: size=%d" % (l, n, W[0]), n = n + 1 for w in W[1:]: print "'%s'" % ... | def dumpXPreformattedFrags(P): print '\n frags = P.frags n =len(frags) for l in range(n): print "frag%d: '%s'" % (l, frags[l].text) l = 0 for L in _getFragLines(frags): n=0 for W in _getFragWords(L): print "frag%d.%d: size=%d" % (l, n, W[0]), n = n + 1 for w in W[1:]: print "'%s'" % w[1], print l = l + 1 | 4,601 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent,aW,aH): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,602 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,603 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,604 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,605 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,606 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,607 |
def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | def try_it(text,style,dedent): P=XPreformatted(text,style,dedent=dedent) dumpXPreformattedFrags(P) aW, aH = 456.0, 42.8 w,h = P.wrap(aW, aH) dumpXPreformattedLines(P) S = P.split(aW,aH) for s in S: s.wrap(aW,aH) dumpXPreformattedLines(s) aH = 500 | 4,608 |
def verify(self): """If the _attrMap attribute is not None, this checks all expected attributes are present; no unwanted attributes are present; and (if a checking function is found) checks each attribute has a valid value. Either succeeds or raises an informative exception. """ | def verify(self): """If the _attrMap attribute is not None, this checks all expected attributes are present; no unwanted attributes are present; and (if a checking function is found) checks each attribute has a valid value. Either succeeds or raises an informative exception. """ | 4,609 |
def verify(self): """If the _attrMap attribute is not None, this checks all expected attributes are present; no unwanted attributes are present; and (if a checking function is found) checks each attribute has a valid value. Either succeeds or raises an informative exception. """ | defverify(self):"""Ifthe_attrMapattributeisnotNone,thischecksallexpectedattributesarepresent;nounwantedattributesarepresent;and(ifacheckingfunctionisfound)checkseachattributehasavalidvalue.Eithersucceedsorraisesaninformativeexception.""" | 4,610 |
def save(self): """Saves the file. If holding data, do a showPage() to save them having to.""" if len(self._code): self.showPage() | def save(self): """Saves the file. If holding data, do a showPage() to save them having to.""" if len(self._code): self.showPage() | 4,611 |
def __init__(self, name): self.name = name self.glyphNames = [] self.glyphWidths = {} self.ascent = 0 self.descent = 0 if name == 'ZapfDingbats': self.requiredEncoding = 'ZapfDingbatsEncoding' elif name == 'Symbol': self.requiredEncoding = 'SymbolEncoding' else: self.requiredEncoding = None | def__init__(self,name):self.name=nameself.glyphNames=[]self.glyphWidths={}self.ascent=0self.descent=0ifname=='ZapfDingbats':self.requiredEncoding='ZapfDingbatsEncoding'elifname=='Symbol':self.requiredEncoding='SymbolEncoding'else:self.requiredEncoding=None | 4,612 |
def _loadBuiltInData(self, name): """Called for the built in 14 fonts. Gets their glyph data. | def_loadBuiltInData(self,name):"""Calledforthebuiltin14fonts.Getstheirglyphdata. | 4,613 |
def __init__(self, fileName): if isinstance(fileName,ImageReader): self.__dict__ = fileName.__dict__ #borgize return if not haveImages: raise RuntimeError('Imaging Library not available, unable to import bitmaps') #start wih lots of null private fields, to be populated by #the relevant engine. self.fileName = fileNam... | def __init__(self, fileName): if isinstance(fileName,ImageReader): self.__dict__ = fileName.__dict__ #borgize return if not haveImages: raise RuntimeError('Imaging Library not available, unable to import bitmaps') #start wih lots of null private fields, to be populated by #the relevant engine. self.fileName = fileNam... | 4,614 |
def __init__(self): self.x = 0 self.y = 0 self.width = 100 self.height = 100 self.data = [1] self.labels = None # or list of strings self.startAngle = 90 self.direction = "clockwise" | def __init__(self): self.x = 0 self.y = 0 self.width = 100 self.height = 100 self.data = [1,1] self.labels = None # or list of strings self.startAngle = 90 self.direction = "clockwise" | 4,615 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,616 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,617 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,618 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,619 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,620 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,621 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,622 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | 4,623 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | defmakeSectors(self):#normalizeslicedataiftype(self.data)in(ListType,TupleType)andtype(self.data[0])in(ListType,TupleType):#it'sanestedlist,morethanonesequencenormData=[]forlinself.data:t=self.normalizeData(l)normData.append(t)else:normData=self.normalizeData(self.data)n=len(normData) | 4,624 |
def makeSectors(self): # normalize slice data if type(self.data) in (ListType, TupleType) and type(self.data[0]) in (ListType, TupleType): #it's a nested list, more than one sequence normData = [] for l in self.data: t = self.normalizeData(l) normData.append(t) else: normData = self.normalizeData(self.data) n = len(nor... | defmakeSectors(self):#normalizeslicedataiftype(self.data)in(ListType,TupleType)andtype(self.data[0])in(ListType,TupleType):#it'sanestedlist,morethanonesequencenormData=[]forlinself.data:t=self.normalizeData(l)normData.append(t)else:normData=self.normalizeData(self.data)n=len(normData) | 4,625 |
def _addCommand(self,cmd): if cmd[0] in ('BACKGROUND','ROWBACKGROUNDS','COLBACKGROUNDS'): self._bkgrndcmds.append(cmd) elif cmd[0] == 'SPAN': self._spanCmds.append(cmd) elif _isLineCommand(cmd): # we expect op, start, stop, weight, colour, cap, dashes, join cmd = tuple(cmd) if len(cmd)<5: raise ValueError('bad line com... | def _addCommand(self,cmd): if cmd[0] in ('BACKGROUND','ROWBACKGROUNDS','COLBACKGROUNDS'): self._bkgrndcmds.append(cmd) elif cmd[0] == 'SPAN': self._spanCmds.append(cmd) elif _isLineCommand(cmd): # we expect op, start, stop, weight, colour, cap, dashes, join cmd = tuple(cmd) if len(cmd)<5: raise ValueError('bad line com... | 4,626 |
def _addCommand(self,cmd): if cmd[0] in ('BACKGROUND','ROWBACKGROUNDS','COLBACKGROUNDS'): self._bkgrndcmds.append(cmd) elif cmd[0] == 'SPAN': self._spanCmds.append(cmd) elif _isLineCommand(cmd): # we expect op, start, stop, weight, colour, cap, dashes, join cmd = tuple(cmd) if len(cmd)<5: raise ValueError('bad line com... | def _addCommand(self,cmd): if cmd[0] in ('BACKGROUND','ROWBACKGROUNDS','COLBACKGROUNDS'): self._bkgrndcmds.append(cmd) elif cmd[0] == 'SPAN': self._spanCmds.append(cmd) elif _isLineCommand(cmd): # we expect op, start, stop, weight, colour, cap, dashes, join cmd = tuple(cmd) if len(cmd)<5: raise ValueError('bad line com... | 4,627 |
def registerTypeFace(face): assert isinstance(face, TypeFace), 'Not a TypeFace: %s' % face _typefaces[face.name] = face # HACK - bold/italic do not apply for type 1, so egister # all combinations of mappings. from reportlab.lib import fonts ttname = string.lower(face.name) fonts.addMapping(ttname, 0, 0, face.name) font... | def registerTypeFace(face): assert isinstance(face, TypeFace), 'Not a TypeFace: %s' % face _typefaces[face.name] = face # HACK - bold/italic do not apply for type 1, so egister # all combinations of mappings. from reportlab.lib import fonts ttname = string.lower(face.name) if not face.name in standardFonts: fonts.addMa... | 4,628 |
def makeTickLabels(self): g = Group() if not self.visibleLabels: return g | def makeTickLabels(self): g = Group() if not self.visibleLabels: return g | 4,629 |
def rl_isdir(pn,os_path_isdir=os.path.isdir,os_path_normpath=os.path.normpath): if os_path_isdir(pn): return True if _isFSD or __loader__ is None: return False pn = os_path_normpath(pn) return len(filter(lambda x,pn=pn: x.startswith(pn),__loader__._files.keys()))>0 | def rl_isdir(pn,os_path_isdir=os.path.isdir,os_path_normpath=os.path.normpath): if os_path_isdir(pn): return True if _isFSD or __loader__ is None: return False pn = _startswith_rl(os_path_normpath(pn)) if not pn.endswith(os.sep): pn += os.sep return len(filter(lambda x,pn=pn: x.startswith(pn),__loader__._files.keys()))... | 4,630 |
def expandUserNodes(self): """Return a new object which only contains primitive shapes.""" | def expandUserNodes(self): """Return a new object which only contains primitive shapes.""" | 4,631 |
def _setRange(self, dataSeries): """Set minimum and maximum axis values. | def _setRange(self, dataSeries): """Set minimum and maximum axis values. | 4,632 |
def rl_get_module(name,dir): if sys.modules.has_key(name): om = sys.modules[name] del sys.modules[name] else: om = None try: f = None try: f, p, desc= imp.find_module(name,[dir]) return imp.load_module(name,f,p,desc) except: if isCompactDistro(): #attempt a load from inside the zip archive import zipimport dir = _start... | def rl_get_module(name,dir): if sys.modules.has_key(name): om = sys.modules[name] del sys.modules[name] else: om = None try: f = None try: f, p, desc= imp.find_module(name,[dir]) return imp.load_module(name,f,p,desc) except: if isCompactDistro(): #attempt a load from inside the zip archive import zipimport dir = _start... | 4,633 |
def colorDistance(col1, col2): """Returns a number between 0 and root(3) stating how similar two colours are - distance in r,g,b, space. Only used to find names for things.""" return math.sqrt( (col1.red - col2.red)**2 + (col1.green - col2.green)**2 + (col1.blue - col2.blue)**2 ) | def colorDistance(col1, col2): """Returns a number between 0 and root(3) stating how similar two colours are - distance in r,g,b, space. Only used to find names for things.""" return math.sqrt( (col1.red - col2.red)**2 + (col1.green - col2.green)**2 + (col1.blue - col2.blue)**2 ) | 4,634 |
def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency if __namedColors is not None: return __namedColors import colors __namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): __namedColors[name] = value return __namedC... | def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency global _namedColors if _namedColors is not None: return _namedColors import colors __namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): __namedColors[name] = valu... | 4,635 |
def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency if __namedColors is not None: return __namedColors import colors __namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): __namedColors[name] = value return __namedC... | def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency if __namedColors is not None: return __namedColors import colors _namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): __namedColors[name] = value return __namedCo... | 4,636 |
def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency if __namedColors is not None: return __namedColors import colors __namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): __namedColors[name] = value return __namedC... | def getAllNamedColors(): #returns a dictionary of all the named ones in the module # uses a singleton for efficiency if __namedColors is not None: return __namedColors import colors __namedColors = {} for (name, value) in colors.__dict__.items(): if isinstance(value, Color): _namedColors[name] = value return _namedCol... | 4,637 |
def beginAttributes(self, aClass): "Append a list of annotated attributes of a class." | def beginAttributes(self, aClass): "Append a list of annotated attributes of a class." | 4,638 |
def wrap(self, aW, aH): W = 0 H = 0 F = self._flowables for f in F: w,h = f.wrap(aW,0xfffffff) if f is not F[0]: h = h + f.getSpaceBefore() if f is not F[-1]: h = h + f.getSpaceAfter() W = max(W,w) H = H+h print 'wrap', aW, aH, W, H self._CPage = H>aH return W, 0xffffff # force a split | def wrap(self, aW, aH): W = 0 H = 0 F = self._flowables for f in F: w,h = f.wrap(aW,0xfffffff) if f is not F[0]: h = h + f.getSpaceBefore() if f is not F[-1]: h = h + f.getSpaceAfter() W = max(W,w) H = H+h self._CPage = H>aH return W, 0xffffff # force a split | 4,639 |
def split(self, aW, aH): print 'wrap', aW, aH, self._CPage S = self._CPage and [CondPageBreak(aH+1)] or [] for f in self._flowables: S.append(f) return S | def split(self, aW, aH): S = self._CPage and [CondPageBreak(aH+1)] or [] for f in self._flowables: S.append(f) return S | 4,640 |
def loadImageFromA85(self,source): IMG=[] imagedata = map(string.strip,pdfutils.cacheImageFile(source,returnInMemory=1,IMG=IMG)) words = string.split(imagedata[1]) self.width, self.height = map(string.atoi,(words[1],words[3])) self.colorSpace = 'DeviceRGB' self.bitsPerComponent = 8 self._filters = 'A85','Fl' if IMG: se... | def loadImageFromA85(self,source): IMG=[] imagedata = map(string.strip,pdfutils.cacheImageFile(source,returnInMemory=1,IMG=IMG)) words = string.split(imagedata[1]) self.width, self.height = map(string.atoi,(words[1],words[3])) self.colorSpace = 'DeviceRGB' self.bitsPerComponent = 8 self._filters = 'A85','Fl' if IMG: se... | 4,641 |
def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFon... | def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, getFont, registerFont, _fonts from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_ge... | 4,642 |
def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFon... | def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1... | 4,643 |
def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFon... | def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = getFont(tt... | 4,644 |
def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFon... | def testStringWidth(self): from _rl_accel import stringWidthU from reportlab.pdfbase.pdfmetrics import _py_stringWidth, _py_getFont, registerFont from reportlab.pdfbase.ttfonts import TTFont from sys import getrefcount ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFon... | 4,645 |
def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright %s trademark %s... | def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, getFont, _fonts, unicode2T1 from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright... | 4,646 |
def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright %s trademark %s... | def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = getFont(ttfn) t1f = getFont(t1fn) testCp1252 = 'copyright %s trademark %s registe... | 4,647 |
def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright %s trademark %s... | def test_instanceStringWidth(self): from reportlab.pdfbase.pdfmetrics import registerFont, _py_getFont from reportlab.pdfbase.ttfonts import TTFont ttfn = 'Luxi-Serif' t1fn = 'Times-Roman' registerFont(TTFont(ttfn, "luxiserif.ttf")) ttf = _py_getFont(ttfn) t1f = _py_getFont(t1fn) testCp1252 = 'copyright %s trademark %s... | 4,648 |
def test_unicode2T1(self): from reportlab.pdfbase.pdfmetrics import _py_unicode2T1, _py_getFont from _rl_accel import unicode2T1 t1fn = 'Times-Roman' t1f = _py_getFont(t1fn) enc = 'cp1252' senc = 'utf8' testCp1252 = ('copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9))).... | def test_unicode2T1(self): from reportlab.pdfbase.pdfmetrics import _py_unicode2T1, getFont, _fonts from _rl_accel import unicode2T1 t1fn = 'Times-Roman' t1f = _py_getFont(t1fn) enc = 'cp1252' senc = 'utf8' testCp1252 = ('copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9... | 4,649 |
def test_unicode2T1(self): from reportlab.pdfbase.pdfmetrics import _py_unicode2T1, _py_getFont from _rl_accel import unicode2T1 t1fn = 'Times-Roman' t1f = _py_getFont(t1fn) enc = 'cp1252' senc = 'utf8' testCp1252 = ('copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9))).... | def test_unicode2T1(self): from reportlab.pdfbase.pdfmetrics import _py_unicode2T1, _py_getFont from _rl_accel import unicode2T1 t1fn = 'Times-Roman' t1f = getFont(t1fn) enc = 'cp1252' senc = 'utf8' testCp1252 = ('copyright %s trademark %s registered %s ReportLab! Ol%s!' % (chr(169), chr(153),chr(174), chr(0xe9))).deco... | 4,650 |
def test_getFont(self): from reportlab.pdfbase.pdfmetrics import _py_getFont from _rl_accel import getFontU t1fn = 'Times-Roman' assert _py_getFont(t1fn) is getFontU(t1fn) | def test_getFont(self): from reportlab.pdfbase.pdfmetrics import _py_getFont, getFont from _rl_accel import getFontU t1fn = 'Times-Roman' assert _py_getFont(t1fn) is getFontU(t1fn) | 4,651 |
def normalizeText(self): """It contains literal XML text typed over several lines. We want to throw away tabs, newlines and so on, and only accept embedded string like '\n'""" lines = string.split(self.text, '\n') newtext = [] for line in lines: newtext.append(string.strip(line)) #eval turns all the escape sequences in... | def normalizeText(self): """It contains literal XML text typed over several lines. We want to throw away tabs, newlines and so on, and only accept embedded string like '\n'""" lines = string.split(self.text, '\n') newtext = [] for line in lines: newtext.append(string.strip(line)) #eval turns all the escape sequences in... | 4,652 |
def drawOn(self, canv): if self.color is None: return lines = string.split(string.strip(self.text), '\n') canv.saveState() canv.setFont(self.font, self.size) r,g,b = self.color canv.setFillColorRGB(r,g,b) cur_y = self.y for line in lines: if self.align == layout.TA_LEFT: canv.drawString(self.x, cur_y, line) elif self.a... | def drawOn(self, canv): if self.color is None: return lines = string.split(string.strip(self.text), '\\n') canv.saveState() canv.setFont(self.font, self.size) r,g,b = self.color canv.setFillColorRGB(r,g,b) cur_y = self.y for line in lines: if self.align == layout.TA_LEFT: canv.drawString(self.x, cur_y, line) elif self.... | 4,653 |
def makeDistancesList(list): """Returns a list of distances between adjacent numbers in some input list. E.g. [1, 1, 2, 3, 5, 7] -> [0, 1, 1, 2, 2] """ d = [] for i in range(len(list[:-1])): d.append(list[i+1] - list[i]) return d | def makeDistancesList(list): """Returns a list of distances between adjacent numbers in some input list. E.g. [1, 1, 2, 3, 5, 7] -> [0, 1, 1, 2, 2] """ d = [] for i in range(len(list[:-1])): d.append(list[i+1] - list[i]) return d | 4,654 |
def demo(self): D = Drawing(100, 100) | defdemo(self):D=Drawing(100,100) | 4,655 |
def makeOuterRect(self): # outer grid rectangle group = Group() #print 'Grid.makeOuterRect(%d, %d, %d, %d)' % (self.x, self.y, self.width, self.height) rect = Rect(self.x, self.y, self.width, self.height) rect.fillColor = self.fillColor rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth | def makeOuterRect(self): # outer grid rectangle group = Group() #print 'Grid.makeOuterRect(%d, %d, %d, %d)' % (self.x, self.y, self.width, self.height) rect = Rect(self.x, self.y, self.width, self.height) rect.fillColor = self.fillColor rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth | 4,656 |
def draw(self): # general widget bits group = Group() | def draw(self): # general widget bits group = Group() | 4,657 |
def draw(self): group = Group() | defdraw(self):group=Group() | 4,658 |
def draw(self): group = Group() | defdraw(self):group=Group() | 4,659 |
def draw(self): group = Group() | def draw(self): group = Group() | 4,660 |
def do_exec(cmd, cmdname=None): i=os.popen(cmd,'r') print i.read() i = i.close() if i is not None: if cmdname is not None: print 'Error: '+ cmdname or cmd sys.exit(1) | def do_exec(cmd, cmdname=None): i=os.popen(cmd,'r') print i.read() i = i.close() if i is not None: if cmdname is not None: print 'Error: '+ (cmdname or cmd) sys.exit(1) | 4,661 |
def usage(code=0, msg=''): f = code and sys.stderr or sys.stdout if msg is not None: f.write(msg+'\n') f.write(\ | def usage(code=0, msg=''): f = code and sys.stderr or sys.stdout if msg is not None: f.write(msg+'\n') f.write(\ | 4,662 |
def _AsciiHexDecode(input): """Decodes input using ASCII-Hex coding. Not used except to provide a test of the inverse function.""" #strip out all whitespace stripped = string.join(string.split(input),'') assert stripped[-1] == '>', 'Invalid terminator for Ascii Hex Stream' stripped = stripped[:-1] #chop off terminat... | def _AsciiHexDecode(input): """Decodes input using ASCII-Hex coding. Not used except to provide a test of the inverse function.""" #strip out all whitespace stripped = string.join(string.split(input),'') assert stripped[-1] == '>', 'Invalid terminator for Ascii Hex Stream' stripped = stripped[:-1] #chop off terminat... | 4,663 |
def _AsciiHexDecode(input): """Decodes input using ASCII-Hex coding. Not used except to provide a test of the inverse function.""" #strip out all whitespace stripped = string.join(string.split(input),'') assert stripped[-1] == '>', 'Invalid terminator for Ascii Hex Stream' stripped = stripped[:-1] #chop off terminat... | def _AsciiHexDecode(input): """Decodes input using ASCII-Hex coding. Not used except to provide a test of the inverse function.""" #strip out all whitespace stripped = string.join(string.split(input),'') assert stripped[-1] == '>', 'Invalid terminator for Ascii Hex Stream' stripped = stripped[:-1] #chop off terminat... | 4,664 |
def draw(self): _text = self._text self._text = _text or '' self.computeSize() self._text = _text g = Group() g.translate(self.x + self.dx, self.y + self.dy) g.rotate(self.angle) | def draw(self): _text = self._text self._text = _text or '' self.computeSize() self._text = _text g = Group() g.translate(self.x + self.dx, self.y + self.dy) g.rotate(self.angle) | 4,665 |
def format(self, document): self.BBox = self.BBox or PDFArray([self.lowerx, self.lowery, self.upperx, self.uppery]) self.Matrix = self.Matrix or PDFArray([1, 0, 0, 1, 0, 0]) if not self.Annots: self.Annots = None else: | def format(self, document): self.BBox = self.BBox or PDFArray([self.lowerx, self.lowery, self.upperx, self.uppery]) self.Matrix = self.Matrix or PDFArray([1, 0, 0, 1, 0, 0]) if not self.Annots: self.Annots = None else: | 4,666 |
def loadImageFromPIL(self, PILImage): "Extracts the stream, width and height" zlib = import_zlib() if not zlib: return #standardize it to RGB. We could be more optimal later. if PILImage.mode <> 'RGB': PILImage = PILImage.convert('RGB') imgwidth, imgheight = PILImage.size raw = PILImage.tostring() assert(len(raw) == i... | defif self.mask=='auto': if PILImage.info.has_key("transparency") : transparency = PILImage.info["transparency"] * 3 (tred, tgreen, tblue) = map(ord, PILImage.palette.data[transparency:transparency+3]) self.mask = (tred, tred, tgreen, tgreen, tblue, tblue) else: self.mask = None loadImageFromPIL(self,if self.mask=='aut... | 4,667 |
def format(self, document): S = PDFStream() S.content = self.streamContent | def format(self, document): S = PDFStream() S.content = self.streamContent | 4,668 |
def __init__(self, filename, **kw): frame1 = Frame(2.5*cm, 15.5*cm, 6*cm, 10*cm, id='F1') frame2 = Frame(11.5*cm, 15.5*cm, 6*cm, 10*cm, id='F2') frame3 = Frame(2.5*cm, 2.5*cm, 6*cm, 10*cm, id='F3') frame4 = Frame(11.5*cm, 2.5*cm, 6*cm, 10*cm, id='F4') self.allowSplitting = 0 self.showBoundary = 1 apply(BaseDocTemplate.... | def__init__(self,filename,**kw):frame1=Frame(2.5*cm,15.5*cm,6*cm,10*cm,id='F1')frame2=Frame(11.5*cm,15.5*cm,6*cm,10*cm,id='F2')frame3=Frame(2.5*cm,2.5*cm,6*cm,10*cm,id='F3')frame4=Frame(11.5*cm,2.5*cm,6*cm,10*cm,id='F4')self.allowSplitting=0self.showBoundary=1apply(BaseDocTemplate.__init__,(self,filename),kw)template=P... | 4,669 |
def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | def_test0(self):"Thismakesonelongmulti-pageparagraph."#Buildstory.story=[]a=story.appendstyleSheet=getSampleStyleSheet()h1=styleSheet['Heading1']h1.pageBreakBefore=1h1.keepWithNext=1h2=styleSheet['Heading2']h2.frameBreakBefore=1h2.keepWithNext=1h3=styleSheet['Heading3']h3.backColor=colors.cyanh3.keepWithNext=1bt=styleS... | 4,670 |
def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | 4,671 |
def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | 4,672 |
def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | def _test0(self): "This makes one long multi-page paragraph." # Build story. story = [] a = story.append styleSheet = getSampleStyleSheet() h1 = styleSheet['Heading1'] h1.pageBreakBefore = 1 h1.keepWithNext = 1 h2 = styleSheet['Heading2'] h2.frameBreakBefore = 1 h2.keepWithNext = 1 h3 = styleSheet['Heading3'] h3.b... | 4,673 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,674 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,675 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,676 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,677 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,678 |
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word li... | 4,679 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | 4,680 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | defraiseConfigError(msg):importexceptionsclassConfigError(exceptions.Exception):passraiseConfigError(msg) | 4,681 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | 4,682 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | 4,683 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | defraiseConfigError(msg):importexceptionsclassConfigError(exceptions.Exception):passraiseConfigError(msg) | 4,684 |
def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | def raiseConfigError(msg): import exceptions class ConfigError(exceptions.Exception): pass raise ConfigError(msg) | 4,685 |
def __init__(self,verbose=0): if _xmllib_newStyle: xmllib.XMLParser.__init__(self,verbose=verbose) else: xmllib.XMLParser.__init__(self) # set up handlers for various tags self.elements = { 'b': (self.start_b, self.end_b), 'u': (self.start_u, self.end_u), 'i': (self.start_i, self.end_i), 'super': (self.start_super, sel... | def __init__(self,verbose=0): if _xmllib_newStyle: xmllib.XMLParser.__init__(self,verbose=verbose) else: xmllib.XMLParser.__init__(self) # set up handlers for various tags self.elements = { 'b': (self.start_b, self.end_b), 'u': (self.start_u, self.end_u), 'i': (self.start_i, self.end_i), 'super': (self.start_super, sel... | 4,686 |
def save(self, formats=['pdf'], verbose=None, fnRoot=None): "Saves copies of self in desired location and formats" ext = '' fnroot = os.path.join(getattr(self,'outDir','.'), fnRoot or (getattr(self,'fileNamePattern',(self.__class__.__name__+'%03d') % getattr(self,'chartId',0)))) | def save(self, formats=['pdf'], verbose=None, fnRoot=None): "Saves copies of self in desired location and formats" ext = '' fnroot = os.path.join(getattr(self,'outDir','.'), fnRoot or (getattr(self,'fileNamePattern',(self.__class__.__name__+'%03d') % getattr(self,'chartId',0)))) | 4,687 |
def _add(self, flowable, canv, trySplit=0): """ Draws the flowable at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" y = self._y p = self._y1p s = self._atTop and 0 or flowab... | def _add(self, flowable, canv, trySplit=0): """ Draws the flowable at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" y = self._y p = self._y1p s = 0 if self._atTop: s = flowa... | 4,688 |
def _add(self, flowable, canv, trySplit=0): """ Draws the flowable at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" y = self._y p = self._y1p s = self._atTop and 0 or flowab... | def _add(self, flowable, canv, trySplit=0): """ Draws the flowable at the current position. Returns 1 if successful, 0 if it would not fit. Raises a LayoutError if the object is too wide, or if it is too high for a totally empty frame, to avoid infinite loops""" y = self._y p = self._y1p s = self._atTop and 0 or flowab... | 4,689 |
def split(self,flowable,canv): '''Ask the flowable to split using up the available space.''' y = self._y p = self._y1p s = self._atTop and 0 or flowable.getSpaceBefore() flowable.canv = canv #some flowables might need this r = flowable.split(self._aW, y-p-s) del flowable.canv return r | def split(self,flowable,canv): '''Ask the flowable to split using up the available space.''' y = self._y p = self._y1p s = 0 if self._atTop: s = flowable.getSpaceBefore() flowable.canv = canv #some flowables might need this r = flowable.split(self._aW, y-p-s) del flowable.canv return r | 4,690 |
def _find_rl_accel(): '''locate where the accelerator code lives''' _ = [] for x in [ './rl_addons/rl_accel', '../rl_addons/rl_accel', '../../rl_addons/rl_accel', './rl_accel', '../rl_accel', '../../rl_accel', './lib'] \ + glob.glob('./rl_accel-*/rl_accel')\ + glob.glob('../rl_accel-*/rl_accel') \ + glob.glob('../../rl... | def _find_rl_accel(): '''locate where the accelerator code lives''' _ = [] for x in [ './rl_addons/rl_accel', '../rl_addons/rl_accel', '../../rl_addons/rl_accel', './rl_accel', '../rl_accel', '../../rl_accel', './lib'] \ + glob.glob('./rl_accel-*/rl_accel')\ + glob.glob('../rl_accel-*/rl_accel') \ + glob.glob('../../rl... | 4,691 |
def pre(txt): s = layout.Spacer(0.1*inch, 0.1*inch) Elements.append(s) p = layout.Preformatted(txt, PreStyle) Elements.append(p) | def pre(txt): s = layout.Spacer(0.1*inch, 0.1*inch) Elements.append(s) p = layout.Preformatted(txt, PreStyle) Elements.append(p) | 4,692 |
def pre(txt): s = layout.Spacer(0.1*inch, 0.1*inch) Elements.append(s) p = layout.Preformatted(txt, PreStyle) Elements.append(p) | def pre(txt): s = layout.Spacer(0.1*inch, 0.1*inch) Elements.append(s) p = layout.Preformatted(txt, PreStyle) Elements.append(p) | 4,693 |
def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | 4,694 |
def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | def BIGENDIAN(macname,value=None): 'define a macro if bigendian' return sys.byteorder=='big' and [(macname,value)] or [] | 4,695 |
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | 4,696 |
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | 4,697 |
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | 4,698 |
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R | 4,699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.