bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def findT1File(self,ext='.pfb'): possible_exts = (string.lower(ext), string.upper(ext)) if hasattr(self,'pfbFileName'): r_basename = os.path.splitext(self.pfbFileName)[0] for e in possible_exts: if os.path.isfile(r_basename + e): return r_basename + e try: r = _fontdata.findT1File(self.name) except: afm = bruteForceSea... | def findT1File(self,ext='.pfb'): possible_exts = (string.lower(ext), string.upper(ext)) if hasattr(self,'pfbFileName'): r_basename = os.path.splitext(self.pfbFileName)[0] for e in possible_exts: if os.path.isfile(r_basename + e): return r_basename + e try: r = _fontdata.findT1File(self.name) except: afm = bruteForceSea... | 4,900 |
def bruteForceSearchForAFM(faceName): """Looks in all AFM files on path for face with given name. Returns AFM file name or None. Ouch!""" import glob from reportlab.rl_config import T1SearchPath for dirname in T1SearchPath: if not os.path.isdir(dirname): continue possibles = glob.glob(dirname + os.sep + '*.afm') for... | def bruteForceSearchForAFM(faceName): """Looks in all AFM files on path for face with given name. Returns AFM file name or None. Ouch!""" import glob from reportlab.rl_config import T1SearchPath for dirname in T1SearchPath: if not os.path.isdir(dirname): continue possibles = glob.glob(dirname + os.sep + '*.[aA][fF][... | 4,901 |
def stringWidth(self, text, size, encoding='utf-8'): "Calculate text width" width = self.face.getCharWidth w = 0 if type(text) is UnicodeType: codes = map(ord, text) else: uText = unicode(text, encoding) codes = map(ord, text) for code in codes: w = w + width(code) return 0.001 * w * size | def stringWidth(self, text, size, encoding='utf-8'): "Calculate text width" width = self.face.getCharWidth w = 0 if type(text) is UnicodeType: codes = map(ord, uText) else: uText = unicode(text, encoding) codes = map(ord, uText) for code in codes: w = w + width(code) return 0.001 * w * size | 4,902 |
def getFunctionBody(f, linesInFile): """Pass in the function object and the lines in the file. Since we will typically grab several things out of the same file. it extracts a multiline text block. Works with methods too.""" if hasattr(f, 'im_func'): #it's a method, drill down and get its function f = f.im_func extr... | def getFunctionBody(f, linesInFile): """Pass in the function object and the lines in the file. Since we will typically grab several things out of the same file. it extracts a multiline text block. Works with methods too.""" if hasattr(f, 'im_func'): #it's a method, drill down and get its function f = f.im_func extr... | 4,903 |
def beginMethod(self, name, doc, sig): if name == 'demo': PdfDocBuilder0.beginMethod(self, name, doc, sig) | def beginMethod(self, name, doc, sig): if name == 'demo': PdfDocBuilder0.beginMethod(self, name, doc, sig) | 4,904 |
def endMethod(self, name, doc, sig): if name == 'demo': PdfDocBuilder0.endMethod(self, name, doc, sig) | def endMethod(self, name, doc, sig): if name == 'demo': PdfDocBuilder0.endMethod(self, name, doc, sig) | 4,905 |
def endClass(self, name, doc, bases): "Append a graphic demo of a widget at the end of a class." PdfDocBuilder0.endClass(self, name, doc, bases) | def endClass(self, name, doc, bases): "Append a graphic demo of a widget at the end of a class." PdfDocBuilder0.endClass(self, name, doc, bases) | 4,906 |
def beginFunction(self, name, doc, sig): bt = self.bt story = self.story story.append(Paragraph(name+sig, bt)) story.append(XPreformatted(doc, bt)) | def beginFunction(self, name, doc, sig): bt = self.bt story = self.story story.append(Paragraph(name+sig, bt)) story.append(XPreformatted(doc, bt)) | 4,907 |
def documentModule0(path, builder=DocBuilder0()): """Generate documentation for one Python file in some format. This handles Python standard modules like string, custom modules on the Python search path like e.g. docpy as well as modules specified with their full path like C:/tmp/junk.py. The doc file will always be ... | def documentModule0(path, builder=GraphPdfDocBuilder0()): """Generate documentation for one Python file in some format. This handles Python standard modules like string, custom modules on the Python search path like e.g. docpy as well as modules specified with their full path like C:/tmp/junk.py. The doc file will... | 4,908 |
def _packageWalkCallback(builder, dirPath, files): """A callback function used when waking over a package tree.""" files = filter(lambda f:f != '__init__.py', files) files = filter(lambda f:f[-3:] == '.py', files) if files: for f in files: path = os.path.join(dirPath, f) print path builder.indentLevel = builder.indent... | def _packageWalkCallback(builder, dirPath, files): "A callback function used when waking over a package tree." files = filter(lambda f:f != '__init__.py', files) files = filter(lambda f:f[-3:] == '.py', files) if files: for f in files: path = os.path.join(dirPath, f) print path builder.indentLevel = builder.indentLeve... | 4,909 |
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | def documentPackage0(pathOrName, builder=GraphPdfDocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the c... | 4,910 |
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | 4,911 |
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | 4,912 |
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directo... | 4,913 |
def main(): """Handle command-line options and trigger corresponding action. """ opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder... | def main(): "Handle command-line options and trigger corresponding action." opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder = Do... | 4,914 |
def main(): """Handle command-line options and trigger corresponding action. """ opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder... | defmain():"""Handlecommand-lineoptionsandtriggercorrespondingaction."""opts,args=getopt.getopt(sys.argv[1:],'hf:m:p:')#On-hprintusageandexitimmediately.foro,ainopts:ifo=='-h':printprintUsage.__doc__#printUsage()sys.exit(0)#On-fsettheDocBuildertouseoradefaultone.builder=DocBuilder0()foro,ainopts:ifo=='-f':builder=eval("... | 4,915 |
def main(): """Handle command-line options and trigger corresponding action. """ opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder... | def main(): """Handle command-line options and trigger corresponding action. """ opts, args = getopt.getopt(sys.argv[1:], 'hf:m:p:') # On -h print usage and exit immediately. for o, a in opts: if o == '-h': print printUsage.__doc__ #printUsage() sys.exit(0) # On -f set the DocBuilder to use or a default one. builder... | 4,916 |
def checkPageSize(self,canv,doc): '''This gets called by the template framework If canv size != template size then the canv size is set to the template size or if that's not available to the doc size. ''' #### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY #RGB converting pagesizes to ints means we are accurate to one poi... | def checkPageSize(self,canv,doc): """This gets called by the template framework If canv size != template size then the canv size is set to the template size or if that's not available to the doc size. ''' #### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY #RGB converting pagesizes to ints means we are accurate to one poi... | 4,917 |
def checkPageSize(self,canv,doc): '''This gets called by the template framework If canv size != template size then the canv size is set to the template size or if that's not available to the doc size. ''' #### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY #RGB converting pagesizes to ints means we are accurate to one poi... | def checkPageSize(self,canv,doc): '''This gets called by the template framework If canv size != template size then the canv size is set to the template size or if that's not available to the doc size. """ #### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY #RGB converting pagesizes to ints means we are accurate to one poi... | 4,918 |
def handle_pageBegin(self): '''Perform actions required at beginning of page. shouldn't normally be called directly''' self.page += 1 if self._debug: logger.debug("beginning page %d" % self.page) self.pageTemplate.beforeDrawPage(self.canv,self) self.pageTemplate.checkPageSize(self.canv,self) self.pageTemplate.onPage(se... | def handle_pageBegin(self): """Perform actions required at beginning of page. shouldn't normally be called directly""" self.page += 1 if self._debug: logger.debug("beginning page %d" % self.page) self.pageTemplate.beforeDrawPage(self.canv,self) self.pageTemplate.checkPageSize(self.canv,self) self.pageTemplate.onPage(se... | 4,919 |
def notify(self, kind, stuff): """"Forward to any listeners""" for l in self._indexingFlowables: l.notify(kind, stuff) | def notify(self, kind, stuff): """Forward to any listeners""" for l in self._indexingFlowables: l.notify(kind, stuff) | 4,920 |
def _rl_accel_dir_info(dir): import stat fn = pjoin(dir,'_rl_accel') return getVersionFromCCode(fn),os.stat(fn)[stat.ST_MTIME] | def _rl_accel_dir_info(dir): import stat fn = pjoin(dir,'_rl_accel.c') try: return getVersionFromCCode(fn),os.stat(fn)[stat.ST_MTIME] except: return None | 4,921 |
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,922 |
def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | 4,923 |
def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | 4,924 |
def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | def run(): RL_ACCEL = _find_rl_accel() LIBS = [] DATA_FILES = {} if not RL_ACCEL: EXT_MODULES = [] print '***************************************************' print '*No rl_accel code found, you can obtain it at *' print '*http://www.reportlab.org/downloads.html#_rl_accel*' print '**********************************... | 4,925 |
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... | 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 not self._atTop: s = f... | 4,926 |
def addIdent(self, t): "Add an identifier." o = self.options # Make base font bold. fam, b, i = fonts.ps2tt(o.fontName) ps = fonts.tt2ps(fam, 1, i) font = (ps, o.fontSize) self.setFillColorAndFont(o.identCol, font) self.putText(t) # Bookmark certain identifiers (class and function names). if not o.noOutline and not... | def addIdent(self, t): "Add an identifier." o = self.options # Make base font bold. fam, b, i = fonts.ps2tt(o.fontName) ps = fonts.tt2ps(fam, 1, i) font = (ps, o.fontSize) self.setFillColorAndFont(o.identCol, font) self.putText(t) # Bookmark certain identifiers (class and function names). if not o.noOutline and not... | 4,927 |
def _calc(self): if hasattr(self,'_width'): return | def _calc(self): if hasattr(self,'_width'): return | 4,928 |
def drawEllipse(self, ellipse): #need to convert to pdfgen's bounding box representation x1 = ellipse.cx - ellipse.rx x2 = ellipse.cx + ellipse.rx y1 = ellipse.cy - ellipse.ry y2 = ellipse.cy + ellipse.ry self._canvas.ellipse(x1,y1,x2,y2,fill=1) | def drawEllipse(self, ellipse): #need to convert to pdfgen's bounding box representation x1 = ellipse.cx - ellipse.rx x2 = ellipse.cx + ellipse.rx y1 = ellipse.cy - ellipse.ry y2 = ellipse.cy + ellipse.ry self._canvas.ellipse(x1,y1,x2,y2,fill=1) | 4,929 |
def __init__(self, name): self.name = name self.graphics = [] | def __init__(self, name): self.name = name self.graphics = [] | 4,930 |
def drawOn(self, canv): for graphic in self.graphics: | def drawOn(self, canv): for graphic in self.graphics: | 4,931 |
def drawOn(self, canv): for graphic in self.graphics: | def drawOn(self, canv): for graphic in self.graphics: | 4,932 |
def drawOn(self, canv): for graphic in self.graphics: | def drawOn(self, canv): for graphic in self.graphics: | 4,933 |
def draw(self): if self._text == None: self._text = '' # hack, but it works for now... self.computeSize() 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 '' # hack, but it works for now... self.computeSize() g = Group() g.translate(self.x + self.dx, self.y + self.dy) g.rotate(self.angle) | 4,934 |
def draw(self): exec self.command in globals(), {'canvas':self.canv} | def draw(self): exec self.command in globals(), {'canvas':self.canv} | 4,935 |
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.y1 + self.bottomPadding w, h = 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.y1 + self.bottomPadding w, h = flowab... | 4,936 |
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.y1 + self.bottomPadding w, h = flowab... | def_add(self,flowable,canv,trySplit=0):"""Drawstheflowableatthecurrentposition.Returns1ifsuccessful,0ifitwouldnotfit.RaisesaLayoutErroriftheobjectistoowide,orifitistoohighforatotallyemptyframe,toavoidinfiniteloops"""y=self.yp=self.y1+self.bottomPaddingw,h=flowable.wrap(self.width,y-p) | 4,937 |
def _doNothing(flowables, doc): "Dummy callback for onFirstPage and onNewPage" pass | def _doNothing(canvas, doc): "Dummy callback for onPage" pass | 4,938 |
def run(): objects_to_draw = [] from reportlab.lib.styles import ParagraphStyle from reportlab.platypus.paragraph import Paragraph #need a style normal = ParagraphStyle('normal') normal.firstLineIndent = 18 normal.spaceBefore = 6 import random for i in range(15): height = 0.5 + (2*random.random()) box = XBox(6 * inch,... | defrun():objects_to_draw=[]fromreportlab.lib.stylesimportParagraphStylefromreportlab.platypus.paragraphimportParagraph#needastylenormal=ParagraphStyle('normal')normal.firstLineIndent=18normal.spaceBefore=6importrandomforiinrange(15):height=0.5+(2*random.random())box=XBox(6*inch,height*inch,'BoxNumber%d'%i)objects_to_dr... | 4,939 |
def run(): objects_to_draw = [] from reportlab.lib.styles import ParagraphStyle from reportlab.platypus.paragraph import Paragraph #need a style normal = ParagraphStyle('normal') normal.firstLineIndent = 18 normal.spaceBefore = 6 import random for i in range(15): height = 0.5 + (2*random.random()) box = XBox(6 * inch,... | defrun():objects_to_draw=[]fromreportlab.lib.stylesimportParagraphStylefromreportlab.platypus.paragraphimportParagraph#needastylenormal=ParagraphStyle('normal')normal.firstLineIndent=18normal.spaceBefore=6importrandomforiinrange(15):height=0.5+(2*random.random())box=XBox(6*inch,height*inch,'BoxNumber%d'%i)objects_to_dr... | 4,940 |
def drawChars(self, charList): """Fills boxes in order. None means skip a box. Empty boxes at end get filled with gray""" extraNeeded = (self.rows * self.charsPerRow - len(charList)) for i in range(extraNeeded): charList.append(None) #charList.extend([None] * extraNeeded) row = 0 col = 0 self.canv.setFont(self.fontNam... | def drawChars(self, charList): """Fills boxes in order. None means skip a box. Empty boxes at end get filled with gray""" extraNeeded = (self.rows * self.charsPerRow - len(charList)) for i in range(extraNeeded): charList.append(None) #charList.extend([None] * extraNeeded) row = 0 col = 0 self.canv.setFont(self.fontNam... | 4,941 |
def drawChars(self, charList): """Fills boxes in order. None means skip a box. Empty boxes at end get filled with gray""" extraNeeded = (self.rows * self.charsPerRow - len(charList)) for i in range(extraNeeded): charList.append(None) #charList.extend([None] * extraNeeded) row = 0 col = 0 self.canv.setFont(self.fontNam... | def drawChars(self, charList): """Fills boxes in order. None means skip a box. Empty boxes at end get filled with gray""" extraNeeded = (self.rows * self.charsPerRow - len(charList)) for i in range(extraNeeded): charList.append(None) #charList.extend([None] * extraNeeded) row = 0 col = 0 self.canv.setFont(self.fontNam... | 4,942 |
def makeSuite(): # only run the tests if _rl_accel is present try: import _rl_accel return makeSuiteForClasses(RlAccelTestCase) except ImportError: return None | def makeSuite(): # only run the tests if _rl_accel is present try: import _rl_accel Klass = RlAccelTestCase except: class Klass(unittest.TestCase): pass return makeSuiteForClasses(Klass) | 4,943 |
def makeSuite(): # only run the tests if _rl_accel is present try: import _rl_accel return makeSuiteForClasses(RlAccelTestCase) except ImportError: return None | def makeSuite(): # only run the tests if _rl_accel is present try: import _rl_accel return makeSuiteForClasses(RlAccelTestCase) except ImportError: return None | 4,944 |
def drawInlineImage(self, canvas): #, image, x,y, width=None,height=None): """Draw an Image into the specified rectangle. If width and height are omitted, they are calculated from the image size. Also allow file names as well as images. This allows a caching mechanism""" | defdrawInlineImage(self,canvas):#,image,x,y,width=None,height=None):"""DrawanImageintothespecifiedrectangle.Ifwidthandheightareomitted,theyarecalculatedfromtheimagesize.Alsoallowfilenamesaswellasimages.Thisallowsacachingmechanism""" | 4,945 |
def drawInlineImage(self, canvas): #, image, x,y, width=None,height=None): """Draw an Image into the specified rectangle. If width and height are omitted, they are calculated from the image size. Also allow file names as well as images. This allows a caching mechanism""" | def drawInlineImage(self, canvas): #, image, x,y, width=None,height=None): ... | 4,946 |
def draw(self): slices = self.slices _3d_angle = self.angle_3d _3dva = self._3dva = _360(_3d_angle+90) a0 = _2rad(_3dva) self._xdepth_3d = cos(a0)*self.depth_3d self._ydepth_3d = sin(a0)*self.depth_3d self._cx = self.x+self.width/2.0 self._cy = self.y+(self.height - self._ydepth_3d)/2.0 radius = self._radius = self._cx... | def draw(self): slices = self.slices _3d_angle = self.angle_3d _3dva = self._3dva = _360(_3d_angle+90) a0 = _2rad(_3dva) self._xdepth_3d = cos(a0)*self.depth_3d self._ydepth_3d = sin(a0)*self.depth_3d self._cx = self.x+self.width/2.0 self._cy = self.y+(self.height - self._ydepth_3d)/2.0 radiusx = radiusy = self._cx-sel... | 4,947 |
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: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+(' co -r %s reportlab'%release), 'the download phase') else: os.environ['CVSRO... | def cvs_checkout(d): os.chdir(d) recursive_rmdir(cvsdir) cvs = find_exe('cvs') if cvs is None: os.exit(1) if release: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+(' co -r %s reportlab'%release), 'the download phase') else: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % ... | 4,948 |
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: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+(' co -r %s reportlab'%release), 'the download phase') else: os.environ['CVSRO... | 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: do_exec(cvs+(' export -r %s reportlab'%release), 'the export phase') else: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+' c... | 4,949 |
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: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+(' co -r %s reportlab'%release), 'the download phase') else: os.environ['CVSRO... | 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: os.environ['CVSROOT']=':pserver:%s@cvs:/cvsroot/reportlab' % USER do_exec(cvs+(' co -r %s reportlab'%release), 'the download phase') else: do_exec(cvs+' co ... | 4,950 |
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) | 4,951 |
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) | 4,952 |
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) | 4,953 |
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) | 4,954 |
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) | 4,955 |
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) | 4,956 |
def _findMinMaxValues(self): "Find the minimum and maximum value of the data we have." | def _findMinMaxValues(self): "Find the minimum and maximum value of the data we have." | 4,957 |
def calcBarPositions(self): """Works out where they go. default vertical. | def calcBarPositions(self): """Works out where they go. default vertical. | 4,958 |
def _digester(s): return string.join(map(lambda x : "%0x" % ord(x), md5.md5(s).digest()), '') | def _digester(s): return string.join(map(lambda x : "%0x" % ord(x), md5.md5(s).digest()), '') | 4,959 |
def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | 4,960 |
def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | 4,961 |
def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | 4,962 |
def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn) | 4,963 |
def setFillColor(self, aColor): """Takes a color object, allowing colors to be referred to by name""" if type(aColor) == ColorType: rgb = (aColor.red, aColor.green, aColor.blue) self._strokeColorRGB = rgb self._code.append('%0.2f %0.2f %0.2f rg' % rgb ) elif type(aColor) in _SeqTypes: l = len(aColor) if l==3: self._str... | def setFillColor(self, aColor): """Takes a color object, allowing colors to be referred to by name""" if type(aColor) == ColorType: rgb = (aColor.red, aColor.green, aColor.blue) self._fillColorRGB = rgb self._code.append('%0.2f %0.2f %0.2f rg' % rgb ) elif type(aColor) in _SeqTypes: l = len(aColor) if l==3: self._strok... | 4,964 |
def setFillColor(self, aColor): """Takes a color object, allowing colors to be referred to by name""" if type(aColor) == ColorType: rgb = (aColor.red, aColor.green, aColor.blue) self._strokeColorRGB = rgb self._code.append('%0.2f %0.2f %0.2f rg' % rgb ) elif type(aColor) in _SeqTypes: l = len(aColor) if l==3: self._str... | def setFillColor(self, aColor): """Takes a color object, allowing colors to be referred to by name""" if type(aColor) == ColorType: rgb = (aColor.red, aColor.green, aColor.blue) self._strokeColorRGB = rgb self._code.append('%0.2f %0.2f %0.2f rg' % rgb ) elif type(aColor) in _SeqTypes: l = len(aColor) if l==3: self._fil... | 4,965 |
def materialize(self, text, length, xyorigin=(0,0), lengthoffset=0, widthoffset=0): "generate a drawables based on this template, with help of 'derived' parameters" # for purposes of generality return a *sequence* of drawables (x,y) = xyorigin orientation = self.orientation # semantics is flipped compared to bar groups... | def materialize(self, text, length, xyorigin=(0,0), lengthoffset=0, widthoffset=0): "generate a drawables based on this template, with help of 'derived' parameters" # for purposes of generality return a *sequence* of drawables (x,y) = xyorigin orientation = self.orientation # semantics is flipped compared to bar groups... | 4,966 |
def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | 4,967 |
def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | 4,968 |
def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | def draw(self): orientation = self.orientation # this could be done cleverly using the other widgets, but what the .... x,y = self.x, self.y fmt = self.labelFormat (delta, startpoint) = scaleParameters(self.minimum, self.maximum, self.nLabels) G = Group() # orientation independent data (direct values for vertical case,... | 4,969 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.height) | def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.height) | 4,970 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.height) | defdraw(self):self.valueAxis.configure(self.data)self.valueAxis.setPosition(self.x,self.y,self.height) | 4,971 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.height) | def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.height) | 4,972 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.width) | def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.width) | 4,973 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.width) | defdraw(self):self.valueAxis.configure(self.data)self.valueAxis.setPosition(self.x,self.y,self.width) | 4,974 |
def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.width) | def draw(self): self.valueAxis.configure(self.data) self.valueAxis.setPosition(self.x, self.y, self.width) | 4,975 |
def getRectsBounds(rectList): # filter out any None objects, e.g. empty groups rectList2 = [] for elem in rectList: if elem == (0,0,0,0): print 'got an empty one' if elem is not None: rectList2.append(elem) xMin, yMin, xMax, yMax = rectList2[0] for (x1, y1, x2, y2) in rectList2[1:]: if x1 < xMin: xMin = x1 if x2 > xMa... | def getRectsBounds(rectList): # filter out any None objects, e.g. empty groups L = filter(lambda x: x is not None, rectList) if not L: return None xMin, yMin, xMax, yMax = L[0] for (x1, y1, x2, y2) in L[1:]: if x1 < xMin: xMin = x1 if x2 > xMax: xMax = x2 if y1 < yMin: yMin = y1 if y2 > yMax: yMax = y2 return (xMin, y... | 4,976 |
def getBounds(self): if self.contents: b = [] for elem in self.contents: b.append(elem.getBounds()) (x1, y1, x2, y2) = getRectsBounds(b) trans = self.transform corners = [[x1,y1], [x1, y2], [x2, y1], [x2,y2]] newCorners = [] for corner in corners: newCorners.append(transformPoint(trans, corner)) return getPointsBounds(... | def getBounds(self): if self.contents: b = [] for elem in self.contents: b.append(elem.getBounds()) x1 = getRectsBounds(b) if x1 is None: return None x1, y1, x2, y2 = x1 trans = self.transform corners = [[x1,y1], [x1, y2], [x2, y1], [x2,y2]] newCorners = [] for corner in corners: newCorners.append(transformPoint(trans,... | 4,977 |
def _checkDXY(self,ba): if ba[0]=='n': if not hasattr(self,'_ody'): self._ody = self.dy self.dy = -self._ody + self._ydepth_3d | def _checkDXY(self,ba): if ba[0]=='n': if not hasattr(self,'_ody'): self._ody = self.dy self.dy = -self._ody + self._ydepth_3d | 4,978 |
def _checkDXY(self,ba): if ba[0]=='n': if not hasattr(self,'_ody'): self._ody = self.dy self.dy = -self._ody + self._ydepth_3d | def _checkDXY(self,ba): if ba[0]=='n': if not hasattr(self,'_ody'): self._ody = self.dy self.dy = -self._ody + self._ydepth_3d | 4,979 |
def test2(self): "try under a directory NOT on the path" rlDir = os.path.dirname(reportlab.__file__) ppDir = os.path.join(rlDir, 'tools','pythonpoint') m1 = recursiveImport('stdparser', baseDir=ppDir) | def test2(self): "try under a directory NOT on the path" D = os.path.join(os.path.dirname(reportlab.__file__), 'tools','pythonpoint') fn = os.path.join(D,'stdparser.py') if os.path.isfile(fn) or os.path.isfile(fn+'c') or os.path.isfile(fn+'o'): m1 = recursiveImport('stdparser', baseDir=D) | 4,980 |
def makeSuite(): return makeSuiteForClasses(ImporterTestCase) | def makeSuite(): return makeSuiteForClasses(ImporterTestCase) | 4,981 |
def open_for_read(name,mode='b'): '''attempt to open a file or URL for reading''' if hasattr(name,'read'): return name import urllib try: t, o = urllib.splittype(name) if not t or t=='file': raise ValueError o = urllib.urlopen(name) return getStringIO(o.read()) except: if 'r' not in mode: mode = 'r'+mode try: return op... | def open_for_read_by_name(name,mode='b'): if 'r' not in mode: mode = 'r'+mode try: return open(name,mode) except IOError: t, v = sys.exc_info()[:2] if _isFSD or __loader__ is None: raise try: name = _startswith_rl(name) s = __loader__.get_data(name) if 'b' not in mode and os.linesep!='\n': s = s.replace(os.linesep,'\... | 4,982 |
def open_for_read(name,mode='b'): '''attempt to open a file or URL for reading''' if hasattr(name,'read'): return name import urllib try: t, o = urllib.splittype(name) if not t or t=='file': raise ValueError o = urllib.urlopen(name) return getStringIO(o.read()) except: if 'r' not in mode: mode = 'r'+mode try: return op... | def open_for_read(name,mode='b'): '''attempt to open a file or URL for reading''' if hasattr(name,'read'): return name try: P = urlparse(name) if not P[0] or P[0]=='file': raise ValueError return getStringIO(urlopen(name).read()) except: if 'r' not in mode: mode = 'r'+mode try: return open(name,mode) except IOError: t,... | 4,983 |
def open_for_read(name,mode='b'): '''attempt to open a file or URL for reading''' if hasattr(name,'read'): return name import urllib try: t, o = urllib.splittype(name) if not t or t=='file': raise ValueError o = urllib.urlopen(name) return getStringIO(o.read()) except: if 'r' not in mode: mode = 'r'+mode try: return op... | def open_for_read(name,mode='b'): '''attempt to open a file or URL for reading''' if hasattr(name,'read'): return name import urllib try: t, o = urllib.splittype(name) if not t or t=='file': raise ValueError o = urllib.urlopen(name) return getStringIO(o.read()) except: if 'r' not in mode: mode = 'r'+mode try: return op... | 4,984 |
def _StarSix(self): r = float(self.size)/2 c = 30*_toradians s = sin(30*_toradians)*r c = cos(c)*r z = s/2 g = c/2 return self._doPolygon((0,r,-z,s,-c,s,-s,0,-c,-s,-z,-s,0,-r,z,-s,c,-s,s,0,c,s,z,s)) | def _StarSix(self): r = float(self.size)/2 c = 30*_toradians s = sin(c)*r c = cos(c)*r z = s/2 g = c/2 return self._doPolygon((0,r,-z,s,-c,s,-s,0,-c,-s,-z,-s,0,-r,z,-s,c,-s,s,0,c,s,z,s)) | 4,985 |
def draw(self): if self.kind: m = getattr(self,'_'+self.kind) if self.angle: _x, _dx, _y, _dy = self.x, self.dx, self.y, self.dy self.x, self.dx, self.y, self.dy = 0,0,0,0 try: m = m() finally: self.x, self.dx, self.y, self.dy = _x, _dx, _y, _dy if not isinstance(m,Group): _m, m = m, Group() m.add(_m) if self.angle: m.... | def draw(self): if self.kind: m = getattr(self,'_'+self.kind) if self.angle: _x, _dx, _y, _dy = self.x, self.dx, self.y, self.dy self.x, self.dx, self.y, self.dy = 0,0,0,0 try: m = m() finally: self.x, self.dx, self.y, self.dy = _x, _dx, _y, _dy if not isinstance(m,Group): _m, m = m, Group() m.add(_m) if self.angle: m.... | 4,986 |
def makeMarker(name,**kw): if Marker._attrMap['kind'].validate(name): m = apply(Marker,(),kw) m.kind = name elif name[-5:]=='_Flag' and Flag._attrMap['kind'].validate(name[:-5]): m = apply(Flag,(),kw) m.kind = name[:-5] m.size = 10 else: raise ValueError, "Invalid marker name %s" % name return m | def makeMarker(name,**kw): if Marker._attrMap['kind'].validate(name): m = apply(Marker,(),kw) m.kind = name elif name[-5:]=='_Flag' and Flag._attrMap['kind'].validate(name[:-5]): m = apply(Flag,(),kw) m.kind = name[:-5] m.size = 10 else: raise ValueError, "Invalid marker name %s" % name return m | 4,987 |
def myFirstPage(canvas, doc): canvas.saveState() canvas.setFont('Times-Bold',16) canvas.drawString(108, layout.PAGE_HEIGHT-108, Title) canvas.setFont('Times-Roman',9) canvas.restoreState() | def myFirstPage(canvas, doc): canvas.saveState() canvas.restoreState() | 4,988 |
def go(): doc = layout.SimpleFlowDocument('fodyssey.pdf',layout.DEFAULT_PAGE_SIZE,showBoundary=0) doc.onFirstPage = myFirstPage doc.onNewPage = myLaterPages doc.build(Elements) | def go(): doc = layout.SimpleFlowDocument('fodyssey.pdf',layout.DEFAULT_PAGE_SIZE,showBoundary=0) doc.onFirstPage = myFirstPage doc.onNewPage = myLaterPages doc.build(Elements) | 4,989 |
def p(txt, style=ParaStyle): Elements.append(layout.Spacer(0.2*inch, 0.1*inch)) Elements.append(Paragraph(txt, style)) | def p(txt, style=ParaStyle): spacer(0.1) Elements.append(Paragraph(txt, style)) | 4,990 |
def p(txt, style=ParaStyle): Elements.append(layout.Spacer(0.2*inch, 0.1*inch)) Elements.append(Paragraph(txt, style)) | def p(txt, style=ParaStyle): Elements.append(layout.Spacer(0.2*inch, 0.1*inch)) Elements.append(Paragraph(txt, style)) | 4,991 |
def pre(txt, style=PreStyle): s = layout.Spacer(0.1*inch, 0.1*inch) Elements.append(s) p = layout.Preformatted(txt, PreStyle) Elements.append(p) | def pre(txt, style=PreStyle): spacer(0.1) p = layout.Preformatted(txt, style) Elements.append(p) | 4,992 |
def findNext(L, i): while 1: if string.strip(L[i])=='': del L[i] kind = 1 if i<len(L): while string.strip(L[i])=='': del L[i] | def findNext(L, i): while 1: if string.strip(L[i])=='': del L[i] kind = 1 if i<len(L): while string.strip(L[i])=='': del L[i] | 4,993 |
def __init__(self): self.fillColor = white self.strokeColor = None self.strokeWidth = 0.1 self.background = ReportLabBlue self.shadow = 0.5 self.height = 86 self.width = 129 self.x = self.y = self.angle = 0 | def __init__(self): self.fillColor = white self.strokeColor = None self.strokeWidth = 0.1 self.background = ReportLabBlue self.shadow = 0.5 self.height = 86 self.width = 129 self.x = self.y = self.angle = 0 | 4,994 |
def _paintLogo(self, g, dx=0, dy=0, strokeColor=None, strokeWidth=0.1, fillColor=white): g.add(definePath([ ('moveTo' ,15.7246,0 ), ('lineTo' ,9.49521,0 ), ('lineTo' ,6.64988,6.83711 ), ('curveTo' ,6.62224,6.95315 ,6.57391,7.10646 ,6.50485,7.29708 ), ('curveTo' ,6.43578,7.48767 ,6.35059,7.71559 ,6.24931,7.98079 ), ('li... | def _paintLogo(self, g, dx=0, dy=0, strokeColor=None, strokeWidth=0.1, fillColor=white): P = [ ('moveTo' ,15.7246,0 ), ('lineTo' ,9.49521,0 ), ('lineTo' ,6.64988,6.83711 ), ('curveTo' ,6.62224,6.95315 ,6.57391,7.10646 ,6.50485,7.29708 ), ('curveTo' ,6.43578,7.48767 ,6.35059,7.71559 ,6.24931,7.98079 ), ('lineTo' ,6.2907... | 4,995 |
def _paintLogo(self, g, dx=0, dy=0, strokeColor=None, strokeWidth=0.1, fillColor=white): g.add(definePath([ ('moveTo' ,15.7246,0 ), ('lineTo' ,9.49521,0 ), ('lineTo' ,6.64988,6.83711 ), ('curveTo' ,6.62224,6.95315 ,6.57391,7.10646 ,6.50485,7.29708 ), ('curveTo' ,6.43578,7.48767 ,6.35059,7.71559 ,6.24931,7.98079 ), ('li... | def _paintLogo(self, g, dx=0, dy=0, strokeColor=None, strokeWidth=0.1, fillColor=white): g.add(definePath([ ('moveTo' ,15.7246,0 ), ('lineTo' ,9.49521,0 ), ('lineTo' ,6.64988,6.83711 ), ('curveTo' ,6.62224,6.95315 ,6.57391,7.10646 ,6.50485,7.29708 ), ('curveTo' ,6.43578,7.48767 ,6.35059,7.71559 ,6.24931,7.98079 ), ('li... | 4,996 |
def draw(self): fillColor = self.fillColor strokeColor = self.strokeColor g = Group() bg = self.background shadow = self.shadow if bg: shadow = Color(bg.red*shadow,bg.green*shadow,bg.blue*shadow) self._paintLogo(g,dy=-2.5, dx=2,fillColor=shadow) self._paintLogo(g,fillColor=fillColor) g.skew(kx=10, ky=0) g.shift(0,35.5)... | def draw(self): fillColor = self.fillColor strokeColor = self.strokeColor g = Group() bg = self.background shadow = self.shadow if bg: shadow = Color(bg.red*shadow,bg.green*shadow,bg.blue*shadow) self._paintLogo(g,dy=-2.5, dx=2,fillColor=shadow) self._paintLogo(g,fillColor=fillColor,strokeColor=strokeColor) g.skew(kx=s... | 4,997 |
def draw(self): fillColor = self.fillColor strokeColor = self.strokeColor g = Group() bg = self.background shadow = self.shadow if bg: shadow = Color(bg.red*shadow,bg.green*shadow,bg.blue*shadow) self._paintLogo(g,dy=-2.5, dx=2,fillColor=shadow) self._paintLogo(g,fillColor=fillColor) g.skew(kx=10, ky=0) g.shift(0,35.5)... | def draw(self): fillColor = self.fillColor strokeColor = self.strokeColor g = Group() bg = self.background shadow = self.shadow if bg: shadow = Color(bg.red*shadow,bg.green*shadow,bg.blue*shadow) self._paintLogo(g,dy=-2.5, dx=2,fillColor=shadow) self._paintLogo(g,fillColor=fillColor) g.skew(kx=10, ky=0) g.shift(0,35.5)... | 4,998 |
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... | 4,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.