bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
5,000
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
5,001
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
5,002
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
def _drawCell(self, cellval, cellstyle, (colpos, rowpos), (colwidth, rowheight)): #print "cellstyle is ", repr(cellstyle), id(cellstyle) if self._curcellstyle is not cellstyle: cur = self._curcellstyle if cur is None or cellstyle.color != cur.color: #print "setting cell color to %s" % `cellstyle.color` self.canv.setFil...
5,003
def _setCellStyle(cellStyles, i, j, op, values): new = CellStyle('<%d, %d>' % (i,j), cellStyles[i][j]) cellStyles[i][j] = new if op == 'FONT': new.fontname = values[0] new.fontsize = values[1] elif op == 'TEXTCOLOR': new.color = colors.toColor(values[0], colors.Color(0,0,0)) elif op in ('ALIGN', 'ALIGNMENT'): new.align...
def _setCellStyle(cellStyles, i, j, op, values): new = CellStyle('<%d, %d>' % (i,j), cellStyles[i][j]) cellStyles[i][j] = new if op == 'FONT': new.fontname = values[0] if n>1: new.fontsize = values[1] if n>2: new.leading = values[2] elif op in ('FONTNAME', 'FACE'): new.fontname = values[0] elif op in ('SIZE', 'FONTSIZE...
5,004
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
5,005
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
5,006
def get_version(): #determine Version if __name__=='__main__': HERE=os.path.dirname(sys.argv[0]) else: HERE=os.path.dirname(__file__) #first try source FN = pjoin(HERE,'__init__') try: for l in open(pjoin(FN+'.py'),'r').readlines(): if l.startswith('Version'): exec l return Version except: pass #don't have source, tr...
def get_version(): #determine Version if __name__=='__main__': HERE=os.path.dirname(sys.argv[0]) else: HERE=os.path.dirname(__file__) #first try source FN = pjoin(HERE,'__init__') try: for l in open(pjoin(FN+'.py'),'r').readlines(): if l.startswith('Version'): exec l.strip() return Version except: pass #don't have so...
5,007
def start_stylesheet(self, args): #makes it the current style sheet. path = self._arg('stylesheet',args,'path') if path=='None': path = [] if (isinstance (path, str)): path = [path] path.append('styles') path.append(os.getcwd()) modulename = self._arg('stylesheet', args, 'module') funcname = self._arg('stylesheet', arg...
def start_stylesheet(self, args): #makes it the current style sheet. path = self._arg('stylesheet',args,'path') if path=='None': path = [] if type(path) not in SeqTypes: path = [path] path.append('styles') path.append(os.getcwd()) modulename = self._arg('stylesheet', args, 'module') funcname = self._arg('stylesheet', a...
5,008
def wrap(self, availWidth, availHeight): """This will be called by the enclosing frame before objects are asked their size, drawn or whatever. It returns the size actually used.""" return (self.width, self.height)
def wrap(self, availWidth, availHeight): """This will be called by the enclosing frame before objects are asked their size, drawn or whatever. It returns the size actually used.""" return (self.width, self.height)
5,009
def _setOpt(name, value, conv=None): '''set a module level value from environ/default''' from os import environ ename = 'RL_'+name if environ.has_key(ename): value = environ[ename] if conv: value = conv(value) globals()[name] = value
def _setOpt(name, value, conv=None): '''set a module level value from environ/default''' from os import environ ename = 'RL_'+name if environ.has_key(ename): value = environ[ename] if conv: value = conv(value) globals()[name] = value
5,010
def _setOpt(name, value, conv=None): '''set a module level value from environ/default''' from os import environ ename = 'RL_'+name if environ.has_key(ename): value = environ[ename] if conv: value = conv(value) globals()[name] = value
def _setOpt(name, value, conv=None): '''set a module level value from environ/default''' from os import environ ename = 'RL_'+name if environ.has_key(ename): value = environ[ename] if conv: value = conv(value) globals()[name] = value
5,011
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...
5,012
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...
5,013
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...
5,014
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...
5,015
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...
5,016
def drawit(F,w=400,h=200,fontSize=12,slack=2,gap=5): D = Drawing(w,h) th = 2*gap + fontSize*1.2 gh = gap + .2*fontSize y = h maxx = 0 for fontName in F: y -= th text = fontName+": I should be totally horizontal and enclosed in a box" textWidth = stringWidth(text, fontName, fontSize) maxx = max(maxx,textWidth+20) D.add(...
def drawit(F,w=400,h=200,fontSize=12,slack=2,gap=5): D = Drawing(w,h) th = 2*gap + fontSize*1.2 gh = gap + .2*fontSize y = h maxx = 0 for fontName in F: y -= th text = fontName+": I should be totally horizontal and enclosed in a box" textWidth = stringWidth(text, fontName, fontSize) maxx = max(maxx,textWidth+20) D.add(...
5,017
def cvs_checkout(d): os.chdir(d) recursive_rmdir(cvsdir) cvs = find_exe('cvs') if cvs is None: print "Can't find cvs anywhere on the path" os.exit(1) if release: print release os.environ['CVSROOT']=':ext:%s@cvs1:/cvsroot/reportlab' % USER #do_exec(cvs+(' rtag %s' % release), 'the tag phase') do_exec(cvs+(' co -r %s r...
defdo_exec(cvs+(' rtag %s' % release), 'the tag phase') cvs_checkout(d):do_exec(cvs+(' rtag %s' % release), 'the tag phase') os.chdir(d)do_exec(cvs+(' rtag %s' % release), 'the tag phase') recursive_rmdir(cvsdir)do_exec(cvs+(' rtag %s' % release), 'the tag phase') do_exec(cvs+(' rtag %s' % release), 'the tag phase') cv...
5,018
def setTextOrigin(self, x, y): if self._canvas.bottomup: self._code.append('1 0 0 1 %s Tm' % fp_str(x, y)) #bottom up else: self._code.append('1 0 0 -1 %s Tm' % fp_str(x, y)) #top down self._x = x self._y = y self._x0 = x #the margin
def setTextOrigin(self, x, y): if self._canvas.bottomup: self._code.append('1 0 0 1 %s Tm' % fp_str(x, y)) #bottom up else: self._code.append('1 0 0 -1 %s Tm' % fp_str(x, y)) #top down self._x0 = self._x = x self._y0 = self._y = y #the margin
5,019
def setTextTransform(self, a, b, c, d, e, f): "Like setTextOrigin, but does rotation, scaling etc." if not self._canvas.bottomup: c = -c #reverse bottom row of the 2D Transform d = -d self._code.append('%s Tm' % fp_str(a, b, c, d, e, f)) #we only measure coords relative to present text matrix self._x = e self._y = f
def setTextTransform(self, a, b, c, d, e, f): "Like setTextOrigin, but does rotation, scaling etc." if not self._canvas.bottomup: c = -c #reverse bottom row of the 2D Transform d = -d self._code.append('%s Tm' % fp_str(a, b, c, d, e, f)) #we only measure coords relative to present text matrix self._x = e self._y = f
5,020
def moveCursor(self, dx, dy): """Moves to a point dx, dy away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" if self._code and self._code[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.jo...
def moveCursor(self, dx, dy): """Starts a new line at an offset dx,dy from the start of the current line. This does not move the cursor relative to the current position, and it changes the current offset of every future line drawn (i.e. if you next do a textLine() call, it will move the cursor to a position one line l...
5,021
def moveCursor(self, dx, dy): """Moves to a point dx, dy away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" if self._code and self._code[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.jo...
def moveCursor(self, dx, dy): """Moves to a point dx, dy away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" if self._code and self._code[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.jo...
5,022
def setXPos(self, dx): """Moves to a point dx away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" self.moveCursor(dx,0)
def setXPos(self, dx): """Starts a new line dx away from the start of the current line - NOT from the current point! So if you call it in mid-sentence, watch out.""" self.moveCursor(dx,0)
5,023
def textLines(self, stuff, trim=1): """prints multi-line or newlined strings, moving down. One comon use is to quote a multi-line block in your Python code; since this may be indented, by default it trims whitespace off each line and from the beginning; set trim=0 to preserve whitespace.""" if type(stuff) == StringTyp...
def textLines(self, stuff, trim=1): """prints multi-line or newlined strings, moving down. One comon use is to quote a multi-line block in your Python code; since this may be indented, by default it trims whitespace off each line and from the beginning; set trim=0 to preserve whitespace.""" if type(stuff) == StringTyp...
5,024
def findT1File(fontName,ext='.pfb'): from reportlab.rl_config import T1SearchPath assert T1SearchPath!=[], "No Type-1 font search path" if sys.platform in ('linux2',) and ext='.pfb': ext = '' n = _findFNR(fontName)+ext for d in T1SearchPath: f = os.path.join(d,n) if os.path.isfile(f): return f return None
def findT1File(fontName,ext='.pfb'): from reportlab.rl_config import T1SearchPath assert T1SearchPath!=[], "No Type-1 font search path" if sys.platform in ('linux2',) and ext=='.pfb': ext = '' n = _findFNR(fontName)+ext for d in T1SearchPath: f = os.path.join(d,n) if os.path.isfile(f): return f return None
5,025
def __init__(self): self.strokeWidth = 0 self.fillColor = None self.strokeColor = STATE_DEFAULTS["strokeColor"] self.strokeDashArray = STATE_DEFAULTS["strokeDashArray"] self.popout = 0 self.fontName = STATE_DEFAULTS["fontName"] self.fontSize = STATE_DEFAULTS["fontSize"] self.fontColor = STATE_DEFAULTS["fillColor"] self...
def __init__(self): self.strokeWidth = 0 self.fillColor = None self.strokeColor = STATE_DEFAULTS["strokeColor"] self.strokeDashArray = STATE_DEFAULTS["strokeDashArray"] self.popout = 0 self.fontName = STATE_DEFAULTS["fontName"] self.fontSize = STATE_DEFAULTS["fontSize"] self.fontColor = STATE_DEFAULTS["fillColor"] self...
5,026
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...
5,027
def buildup_test(cls=test_pyRXPU,I=[]): ''' Add test methods to the TestCase ''' cls.valid = [] cls.invalid = [] cls.notwf = [] testdir = os.path.dirname(__file__) try: zipf = zipfile.ZipFile(os.path.join(testdir,'xmltest.zip')) except: print >> sys.stderr, "Can't locate file xmltest.zip\nPerhaps it should be downloade...
def buildup_test(cls=test_pyRXPU,I=[]): ''' Add test methods to the TestCase ''' cls.valid = [] cls.invalid = [] cls.notwf = [] testdir = os.path.dirname(__file__) try: zipf = zipfile.ZipFile(os.path.join(testdir,'xmltest.zip')) except: print >> sys.stderr, "Can't locate file xmltest.zip\nPerhaps it should be downloade...
5,028
def SaveToFile(self, filename,canvas): """Open a file, and ask each object in turn to write itself to the file. Keep track of the file position at each point for use in the index at the end"""
def SaveToFile(self, filename,canvas): """Open a file, and ask each object in turn to write itself to the file. Keep track of the file position at each point for use in the index at the end"""
5,029
def SaveToFile(self, filename,canvas): """Open a file, and ask each object in turn to write itself to the file. Keep track of the file position at each point for use in the index at the end"""
def SaveToFile(self, filename,canvas): """Open a file, and ask each object in turn to write itself to the file. Keep track of the file position at each point for use in the index at the end"""
5,030
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
5,031
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) idToObject = self.idToObject if name is None ...
5,032
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
5,033
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
def Reference(self, object, name=None): ### note references may "grow" during the final formatting pass: don't use d.keys()! # don't make references to other references, or non instances from types import InstanceType #print"object type is ", type(object) tob = type(object) if (tob is not InstanceType) or (tob is Insta...
5,034
def __init__(self, data, colWidths=None, rowHeights=None, style=None, repeatRows=0, repeatCols=0, splitByRow=1, emptyTableAction=None): #print "colWidths", colWidths self.hAlign = 'CENTER' self.vAlign = 'MIDDLE' if type(data) not in _SeqTypes: raise ValueError, "%s invalid data type" % self.identity() self._nrows = nro...
def __init__(self, data, colWidths=None, rowHeights=None, style=None, repeatRows=0, repeatCols=0, splitByRow=1, emptyTableAction=None): #print "colWidths", colWidths self.hAlign = 'CENTER' self.vAlign = 'MIDDLE' if type(data) not in _SeqTypes: raise ValueError, "%s invalid data type" % self.identity() self._nrows = nro...
5,035
def identity(self, maxLen=30): '''Identify our selves as well as possible''' vx = None nr = self._nrows if not hasattr(self,'_ncols'): nc = 'unknown' else: nc = self._ncols cv = self._cellvalues b = 0 for i in xrange(nr): for j in xrange(nc): v = cv[i][j] t = type(v) if t in _SeqTypes or isinstance(v,Flowable): if not ...
def identity(self, maxLen=30): '''Identify our selves as well as possible''' vx = None nr = getattr(self,'_nrows','unknown') nc = getattr(self,'_ncols','unknown') cv = self._cellvalues if cv and 'unknown' not in (nr,nc): b = 0 for i in xrange(nr): for j in xrange(nc): v = cv[i][j] t = type(v) if t in _SeqTypes or isins...
5,036
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,037
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,038
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,039
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,040
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,041
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,042
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,043
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,044
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,045
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,046
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
def checkMood(moodName): return (moodName in ('happy','sad','ok'))
5,047
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
5,048
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
5,049
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
5,050
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
5,051
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
def func(x): W, H = _listWrapOn(self._content,x*availWidth,self.canv) W /= x H /= x return W, H
5,052
def makeInnerLines(self): # inner grid lines group = Group() if self.useLines == 1: if self.orientation == 'vertical': for x in xrange(self.x + self.delta0, self.x + self.width, self.delta): line = Line(x, self.y, x, self.y + self.height) line.strokeColor = self.strokeColor line.strokeWidth = self.strokeWidth group.ad...
def makeInnerLines(self): # inner grid lines group = Group() if self.useLines == 1: if self.orientation == 'vertical': for x in frange(self.x + self.delta0, self.x + w, self.delta): line = Line(x, self.y, x, self.y + h) line.strokeColor = self.strokeColor line.strokeWidth = self.strokeWidth group.add(line) elif self.o...
5,053
def makeInnerLines(self): # inner grid lines group = Group() if self.useLines == 1: if self.orientation == 'vertical': for x in xrange(self.x + self.delta0, self.x + self.width, self.delta): line = Line(x, self.y, x, self.y + self.height) line.strokeColor = self.strokeColor line.strokeWidth = self.strokeWidth group.ad...
def makeInnerLines(self): # inner grid lines group = Group() if self.useLines == 1: if self.orientation == 'vertical': for x in xrange(self.x + self.delta0, self.x + self.width, self.delta): line = Line(x, self.y, x, self.y + self.height) line.strokeColor = self.strokeColor line.strokeWidth = self.strokeWidth group.ad...
5,054
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,055
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,056
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,057
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,058
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,059
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,060
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,061
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,062
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,063
def makeInnerTiles(self): # inner grid lines group = Group()
def makeInnerTiles(self): # inner grid lines group = Group()
5,064
def __init__(self): self.x = 0 self.y = 0 self.width = 100 self.height = 100 self.orientation = 'vertical' self.numShades = 20.0 self.fillColorStart = colors.pink self.fillColorEnd = colors.black self.strokeColor = colors.black self.strokeWidth = 2
def __init__(self): self.x = 0 self.y = 0 self.width = 100 self.height = 100 self.orientation = 'vertical' self.numShades = 20 self.fillColorStart = colors.pink self.fillColorEnd = colors.black self.strokeColor = colors.black self.strokeWidth = 2
5,065
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() w, h = self.width, self.height rect = Rect(self.x, self.y, w, h) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,066
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,067
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,068
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,069
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,070
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
def draw(self): # general widget bits group = Group() rect = Rect(self.x, self.y, self.width, self.height) rect.strokeColor = self.strokeColor rect.strokeWidth = self.strokeWidth rect.fillColor = None group.add(rect)
5,071
def test(): D = Drawing(450,650) g = Grid0() g.x = 20 g.y = 530 g.demo() D.add(g) g = Grid0() g.x = 140 g.y = 530 g.delta0 = 10 g.demo() D.add(g) g = Grid0() g.x = 260 g.y = 530 g.orientation = 'horizontal' g.demo() D.add(g) sr = ShadedRect0() sr.x = 20 sr.y = 390 sr.fillColorStart = colors.Color(0, 0, 0) sr.fillCo...
def test(): D = Drawing(450,650) for row in range(5): y = 530 - row*120 if row == 0: for col in range(3): x = 20 + col*120 g = Grid0() g.x = x g.y = y g.useRects = 0 g.useLines = 1 if col == 0: pass elif col == 1: g.delta0 = 10 elif col == 2: g.orientation = 'horizontal' g.demo() D.add(g) elif row == 1: for col in ran...
5,072
def _calc(self): H = self._rowHeights W = self._colWidths
def _calc(self): H = self._rowHeights W = self._colWidths
5,073
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
def test(): from reportlab.lib.units import inch rowheights = (24, 16, 16, 16, 16) rowheights2 = (24, 16, 16, 16, 30) colwidths = (50, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32) data = ( ('', 'Jan', 'Feb', 'Mar','Apr','May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), ('Mugs', 0, 4, 17, 3, 21, 47, 12, 33, 2,...
5,074
def find_src_files(L,d,N): if string.upper(os.path.basename(d))=='CVS': return #ignore all CVS for n in N: fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn)
def find_src_files(L,d,N): if string.upper(os.path.basename(d))=='CVS': return #ignore all CVS for n in N: fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn)
5,075
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
5,076
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
5,077
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
5,078
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
def makeDocument(filename, pageCallBack=None): #the extra arg is a hack added later, so other #tests can get hold of the canvas just before it is #saved global titlelist, closeit titlelist = [] closeit = 0 c = canvas.Canvas(filename) c.setPageCompression(0) c.setPageCallBack(pageCallBack) framePageForm(c) # define the...
5,079
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Triangle specific bits ae = s*0.125 #(ae = 'an eighth') triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x+(s/2),self.y+s], fillColor = self.color, strokeColor = self.s...
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Triangle specific bits ae = s*0.125 #(ae = 'an eighth') triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x+(s/2),self.y+s], fillColor = self.color, strokeColor = self.s...
5,080
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Triangle specific bits ae = s*0.125 #(ae = 'an eighth') triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x,self.y+s], fillColor = self.color, strokeColor = self.strokeC...
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Triangle specific bits ae = s*0.125 #(ae = 'an eighth') triangle = shapes.Polygon(points = [ self.x, self.y, self.x+s, self.y, self.x,self.y+s], fillColor = self.color, strokeColor = self.strokeC...
5,081
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Octagon specific bits athird=s/3
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # Octagon specific bits athird=s/3
5,082
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # crossbox specific bits box = shapes.Rect(self.x+1, self.y+1, s-2, s-2, fillColor = None, strokeColor = self.boxColor, strokeWidth=2) g.add(box) crossLine1 = shapes.Line(self.x+(s*0.15), self.y+(s*0.15), se...
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # crossbox specific bits box = shapes.Rect(self.x+1, self.y+1, s-2, s-2, fillColor = None, strokeColor = self.boxColor, strokeWidth=2) g.add(box) crossLine1 = shapes.Line(self.x+(s*0.15), self.y+(s*0.15), se...
5,083
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # tickbox specific bits box = shapes.Rect(self.x+1, self.y+1, s-2, s-2, fillColor = None, strokeColor = self.boxColor, strokeWidth=2) g.add(box)
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # tickbox specific bits box = shapes.Rect(self.x+1, self.y+1, s-2, s-2, fillColor = None, strokeColor = self.boxColor, strokeWidth=2) g.add(box)
5,084
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # SmileyFace specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = s/2, fillColor = self.color, strokeColor = colors.black, strokeWidth=s/38.) g.add(outerCircle)
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # SmileyFace specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = s/2, fillColor = self.color, strokeColor = colors.black, strokeWidth=s/38.) g.add(outerCircle)
5,085
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # stop-sign specific bits athird=s/3
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # stop-sign specific bits athird=s/3
5,086
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # no-entry-sign specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = s/2, fillColor = None, strokeColor = colors.black, strokeWidth=1) g.add(outerCircle)
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # no-entry-sign specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = s/2, fillColor = None, strokeColor = colors.black, strokeWidth=1) g.add(outerCircle)
5,087
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # not=allowed specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = (s/2)-(s/10), fillColor = None, strokeColor = colors.red, strokeWidth=s/10.) g.add(outerCircle) centerx=s...
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # not=allowed specific bits outerCircle = shapes.Circle(cx = (self.x+(s/2)), cy = (self.y+(s/2)), r = (s/2)-(s/10), fillColor = None, strokeColor = colors.red, strokeWidth=s/10.) g.add(outerCircle) centerx=s...
5,088
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # no-smoking-sign specific bits newx = self.x+(s/2)-(s/3.5) newy = self.y+(s/2)-(s/32) cigarrette1 = shapes.Rect(x = newx, y = newy, width = (s/2), height =(s/16), fillColor = colors.ghostwhite, strokeColor =...
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() # no-smoking-sign specific bits newx = self.x+(s/2)-(s/3.5) newy = self.y+(s/2)-(s/32) cigarrette1 = shapes.Rect(x = newx, y = newy, width = (s/2), height =(s/16), fillColor = colors.ghostwhite, strokeColor =...
5,089
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() ew = self.exmarkWidth ae = s*0.125 #(ae = 'an eighth')
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() ew = self.exmarkWidth ae = s*0.125 #(ae = 'an eighth')
5,090
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() ew = self.exmarkWidth ae = s*0.125 #(ae = 'an eighth')
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group() ew = self.exmarkWidth ae = s*0.125 #(ae = 'an eighth')
5,091
def demo(self): D = shapes.Drawing(200, 100) yn = YesNo0() yn.x = 15 yn.y = 25 yn.size = 70 yn.testValue = 0 yn.draw() D.add(yn) yn2 = YesNo0() yn2.x = 120 yn2.y = 25 yn2.size = 70 yn2.testValue = 1 yn2.draw() D.add(yn2) labelFontSize = 8 D.add(shapes.String(yn.x+(yn.size/2),(yn.y-(1.2*labelFontSize)), 'testValue=0', f...
def demo(self): D = shapes.Drawing(200, 100) yn = YesNo0() yn.x = 15 yn.y = 25 yn.size = 70 yn.testValue = 0 yn.draw() D.add(yn) yn2 = YesNo0() yn2.x = 120 yn2.y = 25 yn2.size = 70 yn2.testValue = 1 yn2.draw() D.add(yn2) labelFontSize = 8 D.add(shapes.String(yn.x+(yn.size/2),(yn.y-(1.2*labelFontSize)), 'testValue=0', f...
5,092
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group()
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group()
5,093
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group()
def draw(self): # general widget bits s = self.size # abbreviate as we will use this a lot g = shapes.Group()
5,094
def test(): """This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.bla...
def test(): """This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.bla...
5,095
def test(): """This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.bla...
def test(): """This function produces a pdf with examples of all the signs and symbols from this file. """ labelFontSize = 10 D = shapes.Drawing(450,650) cb = Crossbox0() cb.x = 20 cb.y = 530 cb.demo() D.add(cb) D.add(shapes.String(cb.x+(cb.size/2),(cb.y-(1.2*labelFontSize)), cb.__class__.__name__, fillColor=colors.bla...
5,096
def __setitem__(self, index, value): if self.vecttor[index]!=value: L = list(self.vector) L[index] = value self.vector = tuple(L)
def __setitem__(self, index, value): if self.vector[index]!=value: L = list(self.vector) L[index] = value self.vector = tuple(L)
5,097
def testMetrics(): # load the standard ones: for baseFontName in standardFonts: encoding = WinAnsiEncoding fontName = baseFontName + '-WinAnsi' font = Type1Font(fontName, baseFontName, encoding) addWidths(fontName, font.getWidths()) #test it msg = 'Hello World' w = stringWidth(msg, fontName, 10)# print 'width of "%s" i...
def testMetrics(): # load the standard ones: for baseFontName in standardFonts: encoding = WinAnsiEncoding fontName = baseFontName + '-WinAnsi' font = Type1Font(fontName, baseFontName, encoding) #test it msg = 'Hello World' w = stringWidth(msg, fontName, 10)# print 'width of "%s" in 10-point %s = %0.2f' % (msg, fontNam...
5,098
def testFonts(): # make a custom encoded font. import reportlab.pdfgen.canvas c = reportlab.pdfgen.canvas.Canvas('testfonts.pdf') c.setPageCompression(0) c.setFont('Helvetica', 12) c.drawString(100, 700, 'The text below should be in a custom encoding in which all vowels become "z"') # invent a new language where vowel...
def testFonts(): # make a custom encoded font. import reportlab.pdfgen.canvas c = reportlab.pdfgen.canvas.Canvas('testfonts.pdf') c.setPageCompression(0) c.setFont('Helvetica', 12) c.drawString(100, 700, 'The text below should be in a custom encoding in which all vowels become "z"') # invent a new language where vowel...
5,099