rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
include_dirs=[DEVEL_DIR,LIBART_DIR,GT1_DIR], define_macros=[('LIBART_COMPILATION',None)]+ROBIN_DEBUG+[('LIBART_VERSION',LIBART_VERSION)], library_dirs=[],
include_dirs=[DEVEL_DIR,LIBART_DIR,GT1_DIR]+FT_INC_DIR, define_macros=FT_MACROS+[('LIBART_COMPILATION',None)]+MACROS+[('LIBART_VERSION',LIBART_VERSION)], library_dirs=[]+FT_LIB_DIR,
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R
92f97b6f8cea613f1aae2a10f67396d06e1a10c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/92f97b6f8cea613f1aae2a10f67396d06e1a10c9/setup.py
libraries=LIBS,
libraries=LIBS+FT_LIB,
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R
92f97b6f8cea613f1aae2a10f67396d06e1a10c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/92f97b6f8cea613f1aae2a10f67396d06e1a10c9/setup.py
if sys.platform=='win32' and ('install' in sys.argv or 'install_ext' in sys.argv):
if sys.hexversion<0x2030000 and sys.platform=='win32' and ('install' in sys.argv or 'install_ext' in sys.argv):
def pfxJoin(pfx,*N): R=[] for n in N: R.append(pJoin(pfx,n)) return R
92f97b6f8cea613f1aae2a10f67396d06e1a10c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/92f97b6f8cea613f1aae2a10f67396d06e1a10c9/setup.py
labels = labels + [''] * m
labels = list(labels) + [''] * m
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 = [] n = [] for l in self.data: t = self.normalizeData(l) normData.append(t) n.append(len(t)) else: normData = self.normalizeData(self.data) n = len(normData)
c06e6bad154c65b544fa7dbca5033dbcfa8b4985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c06e6bad154c65b544fa7dbca5033dbcfa8b4985/doughnut.py
labels = labels + ['']*i
labels = list(labels) + [''] * i
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 = [] n = [] for l in self.data: t = self.normalizeData(l) normData.append(t) n.append(len(t)) else: normData = self.normalizeData(self.data) n = len(normData)
c06e6bad154c65b544fa7dbca5033dbcfa8b4985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c06e6bad154c65b544fa7dbca5033dbcfa8b4985/doughnut.py
labels = labels + ['']*i
labels = list(labels) + [''] * i
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 = [] n = [] for l in self.data: t = self.normalizeData(l) normData.append(t) n.append(len(t)) else: normData = self.normalizeData(self.data) n = len(normData)
c06e6bad154c65b544fa7dbca5033dbcfa8b4985 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c06e6bad154c65b544fa7dbca5033dbcfa8b4985/doughnut.py
__version__ = '$Id: ttfonts.py,v 1.7 2002/09/02 16:17:29 mgedmin Exp $'
__version__ = '$Id: ttfonts.py,v 1.8 2002/09/06 15:53:51 mgedmin Exp $'
def getSubsetInternalName(self, subset, doc): '''Returns the name of a PDF Font object corresponding to a given subset of this dynamic font. Use this function instead of PDFDocument.getInternalFontName.'''
ddd85034b4c35b2b4ee7b2e22177e894b8b1a474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ddd85034b4c35b2b4ee7b2e22177e894b8b1a474/ttfonts.py
if ver_maj not in (1, 2, 3):
if ver_maj not in (1, 2, 3, 4):
def extractInfo(self, charInfo=1): """Extract typographic information from the loaded font file.
ddd85034b4c35b2b4ee7b2e22177e894b8b1a474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ddd85034b4c35b2b4ee7b2e22177e894b8b1a474/ttfonts.py
loca = apply(pack, [">%d:" % len(loca)] + loca)
loca = apply(pack, [">%dL" % len(loca)] + loca)
def makeSubset(self, subset): """Create a subset of a TrueType font""" output = TTFontMaker()
ddd85034b4c35b2b4ee7b2e22177e894b8b1a474 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/ddd85034b4c35b2b4ee7b2e22177e894b8b1a474/ttfonts.py
if (nText!='' and nText[0]!=' ') or hasattr(f,'cbDefn'):
if currentWidth>0 and ((nText!='' and nText[0]!=' ') or hasattr(f,'cbDefn')):
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word list
7f5e4e48597e0f88fdc97912880ca3f78eed4558 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/7f5e4e48597e0f88fdc97912880ca3f78eed4558/paragraph.py
strokeColor = colors.black,
strokeColor = None,
def _Flag_Palestine(self): s = _size g = Group() box = Rect(0, s/3, s*2, s/3, fillColor = colors.mintcream, strokeColor = colors.black, strokeWidth=0) g.add(box)
b94cd662133d5dfcc05e0fe6c6ac194904071884 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b94cd662133d5dfcc05e0fe6c6ac194904071884/flags.py
for f in formats: if f: c().save(formats=[f],outDir='.',fnRoot=c.__name__)
for fmt in formats: if fmt: c().save(formats=[fmt],outDir='.',fnRoot=c.__name__)
def run(format, VERBOSE=0): formats = string.split(format, ',') for i in range(0, len(formats)): formats[i] == string.lower(string.strip(formats[i])) allfiles = glob.glob('*.py') allfiles.sort() for fn in allfiles: f = string.split(fn, '.')[0] c = getclass(f) if c != None: print c.__name__ try: for f in formats: if f: c().save(formats=[f],outDir='.',fnRoot=c.__name__) if VERBOSE: print " %s.%s" % (c.__name__, f) except: print " COULDN'T CREATE '%s.%s'!" % (c.__name__, format)
4942c0a0b6993516254917d4d2f5dd21a17244e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/4942c0a0b6993516254917d4d2f5dd21a17244e5/runall.py
print " %s.%s" % (c.__name__, f)
print " %s.%s" % (c.__name__, fmt)
def run(format, VERBOSE=0): formats = string.split(format, ',') for i in range(0, len(formats)): formats[i] == string.lower(string.strip(formats[i])) allfiles = glob.glob('*.py') allfiles.sort() for fn in allfiles: f = string.split(fn, '.')[0] c = getclass(f) if c != None: print c.__name__ try: for f in formats: if f: c().save(formats=[f],outDir='.',fnRoot=c.__name__) if VERBOSE: print " %s.%s" % (c.__name__, f) except: print " COULDN'T CREATE '%s.%s'!" % (c.__name__, format)
4942c0a0b6993516254917d4d2f5dd21a17244e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/4942c0a0b6993516254917d4d2f5dd21a17244e5/runall.py
c = min(1,max(0,c-k) m = min(1,max(0,m-k) y = min(1,max(0,y-k)
c = min(1,max(0,c-k)) m = min(1,max(0,m-k)) y = min(1,max(0,y-k))
def rgb2cmyk(r,g,b): c = 1 - r m = 1 - g y = 1 - b k = min(c,m,y) c = min(1,max(0,c-k) m = min(1,max(0,m-k) y = min(1,max(0,y-k) k = min(1,max(0,k)) return (c,m,y,k)
e762e962f47c3ce7cee98180704d148467c760d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/e762e962f47c3ce7cee98180704d148467c760d7/colors.py
import string text = join(self.lines, "\n") return "%s'''\\ \n%s''')" % (H, text)
return "%s'''\\ \n%s''')" % (H, string.join(self.lines,'\n'))
def __repr__(self): bT = self.bulletText H = "Preformatted(" if bT is not None: H = "Preformatted(bulletText=%s," % repr(bT) import string text = join(self.lines, "\n") return "%s'''\\ \n%s''')" % (H, text)
cfad45163672222e97f8ad081b7cd76b9219d374 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/cfad45163672222e97f8ad081b7cd76b9219d374/flowables.py
else: return w, t
def _listCellGeom(self, V,w,s,W=None,H=None,aH=72000): aW = w-s.leftPadding-s.rightPadding aH = aH - s.topPadding - s.bottomPadding t = 0 w = 0 canv = getattr(self,'canv',None) for v in V: vw, vh = v.wrapOn(canv,aW, aH) if W is not None: W.append(vw) if H is not None: H.append(vh) w = max(w,vw) t = t + vh + v.getSpaceBefore()+v.getSpaceAfter() else: return w, t return w, t - V[0].getSpaceBefore()-V[-1].getSpaceAfter()
7d8965c3c851045f5dcebadd12e920c756ccb7b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/7d8965c3c851045f5dcebadd12e920c756ccb7b1/tables.py
failTest('</a>',"Error Error: End tag </a> outside of any element\n in unnamed entity at line 1 char 4 of [unknown]\nerror return=1\nEnd tag\n")
failTest('</a>',"Error Error: End tag </a> outside of any element\n in unnamed entity at line 1 char 4 of [unknown]\nerror return=1\nEnd tag </a> outside of any element\nParse Failed!\n")
def failTest(x,t,tb=1,**kw): goodTest(x,t,tb,**kw)
5dd76e0650d379661fc0a8352a94e76698210b28 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/5dd76e0650d379661fc0a8352a94e76698210b28/t.py
def demo(self): d = Drawing(200, 100)
d9a07782d75aa4d0f1149ac5e4a0b5740c4af6d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d9a07782d75aa4d0f1149ac5e4a0b5740c4af6d4/piecharts.py
sum = 0.0 for number in self.data: sum = sum + number normData = [] for number in self.data: normData.append(360.0 * number / sum) return normData
from operator import add data = self.data sum = float(reduce(add,data)) return abs(sum)>=1e-8 and map(lambda x,f=360./sum: f*x, data) or len(data)*[0]
def normalizeData(self): sum = 0.0 for number in self.data: sum = sum + number
d9a07782d75aa4d0f1149ac5e4a0b5740c4af6d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d9a07782d75aa4d0f1149ac5e4a0b5740c4af6d4/piecharts.py
return tuple(map(lambda x: int((x*255)&255), self.rgb()))
return tuple(map(lambda x: int(x*255)&255, self.rgb()))
def bitmap_rgb(self): return tuple(map(lambda x: int((x*255)&255), self.rgb()))
0406ba761d8aed83e9b3f65d43c15ab341c7d546 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/0406ba761d8aed83e9b3f65d43c15ab341c7d546/colors.py
def _reduceDocStringLength(docStr):
def reduceDocStringLength(docStr):
def _reduceDocStringLength(docStr): "Return first line of a multiline string." return split(docStr, '\n')[0]
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def beginModule(self, name, doc, imported): append = self.outLines.append lev, label = self.indentLevel, self.indentLabel self.outLines.append('%sModule: %s' % (lev*label, name))
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def beginClass(self, name, doc, bases): append = self.outLines.append lev, label = self.indentLevel, self.indentLabel
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def beginMethod(self, name, doc, sig): append = self.outLines.append lev, label = self.indentLevel, self.indentLabel append('%s%s%s' % (lev*label, name, sig))
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def beginFunction(self, name, doc, sig): append = self.outLines.append lev, label = self.indentLevel, self.indentLabel self.outLines.append('%s%s%s' % (lev*label, name, sig))
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
e.g. Ascii, Html, Pdf.
e.g. Ascii, Html, Pdf (default), UmlPdf.
def printUsage(): """docpy0.py - Automated documentation for Python source code.
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
python docpy0.py -p pingo -f Html
python docpy0.py -p reportlab.platypus -f UmlPdf
def printUsage(): """docpy0.py - Automated documentation for Python source code.
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def documentModule0(path, builder=DocBuilder0()):
def documentModule0(path, builder=PdfDocBuilder0()):
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 saved in the current directory with a basename equal to the module's name. """ cwd = os.getcwd() # Append directory to Python search path if we get one. dirName = os.path.dirname(path) if dirName: sys.path.append(dirName) # Remove .py extension from module name. if path[-3:] == '.py': modname = path[:-3] else: modname = path # Remove directory paths from module name. if dirName: modname = os.path.basename(modname) # Load the module. try: module = __import__(modname) except: print 'Failed to import %s.' % modname os.chdir(cwd) return # Do the real documentation work. s = ModuleSkeleton0() s.inspect(module) builder.write(s) # Remove appended directory from Python search path if we got one. if dirName: del sys.path[-1] os.chdir(cwd)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
"""A callback function used when waking over a package tree."""
"A callback function used when waking over a package tree."
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.indentLevel + 1 documentModule0(path, builder) builder.indentLevel = builder.indentLevel - 1
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
def documentPackage0(path, builder=DocBuilder0()):
def documentPackage0(pathOrName, builder=PdfDocBuilder0()):
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 directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0]
if string.find(pathOrName, os.sep) > -1: name = os.path.splitext(os.path.basename(pathOrName))[0] path = pathOrName
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 directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
package = __import__(name) name = path
package = __import__(pathOrName) if '.' in pathOrName: subname = 'package' + pathOrName[string.find(pathOrName, '.'):] package = eval(subname) name = pathOrName
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 directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
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 directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
"""Handle command-line options and trigger corresponding action. """
"Handle command-line options and trigger corresponding action."
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 = DocBuilder0() for o, a in opts: if o == '-f': builder = eval("%sDocBuilder0()" % a) break # Now call the real documentation functions. for o, a in opts: if o == '-m': builder.begin() documentModule0(a, builder) builder.end() sys.exit(0) elif o == '-p': builder.begin() documentPackage0(a, builder) builder.end() sys.exit(0)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
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 = DocBuilder0() for o, a in opts: if o == '-f': builder = eval("%sDocBuilder0()" % a) break # Now call the real documentation functions. for o, a in opts: if o == '-m': builder.begin() documentModule0(a, builder) builder.end() sys.exit(0) elif o == '-p': builder.begin() documentPackage0(a, builder) builder.end() sys.exit(0)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
builder = DocBuilder0()
builder = PdfDocBuilder0()
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 = DocBuilder0() for o, a in opts: if o == '-f': builder = eval("%sDocBuilder0()" % a) break # Now call the real documentation functions. for o, a in opts: if o == '-m': builder.begin() documentModule0(a, builder) builder.end() sys.exit(0) elif o == '-p': builder.begin() documentPackage0(a, builder) builder.end() sys.exit(0)
fa660310d4d2439b60a146f1b4e77001b457944d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/fa660310d4d2439b60a146f1b4e77001b457944d/docpy0.py
print 'zlib not available'
warnOnce('zlib not available')
def cache_imagedata(self): image = self.image if not pdfutils.cachedImageExists(image): if not zlib: print 'zlib not available' return try: import Image except ImportError: print 'Python Imaging Library not available' return pdfutils.cacheImageFile(image)
28c1f54fe62051db0213739fb570e027a6c70969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/28c1f54fe62051db0213739fb570e027a6c70969/pdfimages.py
print 'Python Imaging Library not available'
warnOnce('Python Imaging Library not available')
def cache_imagedata(self): image = self.image if not pdfutils.cachedImageExists(image): if not zlib: print 'zlib not available' return try: import Image except ImportError: print 'Python Imaging Library not available' return pdfutils.cacheImageFile(image)
28c1f54fe62051db0213739fb570e027a6c70969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/28c1f54fe62051db0213739fb570e027a6c70969/pdfimages.py
if not zlib: print 'zlib not available' return
def PIL_imagedata(self): image = self.image if not zlib: print 'zlib not available' return myimage = image.convert('RGB') imgwidth, imgheight = myimage.size
28c1f54fe62051db0213739fb570e027a6c70969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/28c1f54fe62051db0213739fb570e027a6c70969/pdfimages.py
imagedata.append('BI /W %d /H %d /BPC 8 /CS /RGB /F [/A85 /Fl] ID' % (imgwidth, imgheight))
imagedata=['BI /W %d /H %d /BPC 8 /CS /RGB /F [/A85 /Fl] ID' % (imgwidth, imgheight))]
def PIL_imagedata(self): image = self.image if not zlib: print 'zlib not available' return myimage = image.convert('RGB') imgwidth, imgheight = myimage.size
28c1f54fe62051db0213739fb570e027a6c70969 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/28c1f54fe62051db0213739fb570e027a6c70969/pdfimages.py
d = drawing
d = drawing or Drawing(400, 200)
def sample3(drawing=None): "Add sample swatches to a diagram." d = drawing swatches = Legend0() swatches.alignment = 'right' swatches.x = 80 swatches.y = 160 swatches.deltax = 60 swatches.dxTextSpace = 10 swatches.columnMaximum = 4 items = [(colors.red, 'before'), (colors.green, 'after')] swatches.colorNamePairs = items d.add(swatches, 'legend') return d
c909007534f8e443d7a452e60568f3b1287fc262 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c909007534f8e443d7a452e60568f3b1287fc262/test_graphics_charts.py
return tempfile.mktemp('','',get_rl_tempdir()) else: return os.path.join(get_rl_tempdir(),fn)
fn = tempfile.mktemp() return os.path.join(get_rl_tempdir(),fn)
def get_rl_tempfile(fn=None): if not fn: import tempfile return tempfile.mktemp('','',get_rl_tempdir()) else: return os.path.join(get_rl_tempdir(),fn)
92641a71c181ee5d73cc1363987f8d3f32ca880a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/92641a71c181ee5d73cc1363987f8d3f32ca880a/utils.py
if s<=1: return []
if s<=1: del self.blPara return []
def split(self,availWidth, availHeight): if len(self.frags)<=0: return []
53320badfa0a01e45da5dfa0c826979c0b813239 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/53320badfa0a01e45da5dfa0c826979c0b813239/paragraph.py
dumpParagraphLines(P)
dumpParagraphLines(P)
def flagged(i,TESTS=TESTS): return 'all' in TESTS or '*' in TESTS or str(i) in TESTS
53320badfa0a01e45da5dfa0c826979c0b813239 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/53320badfa0a01e45da5dfa0c826979c0b813239/paragraph.py
if isFile and not hasSeek: filename = filename._filename
def multiBuild(self, story, filename=None, canvasmaker=canvas.Canvas, maxPasses = 10): """Makes multiple passes until all indexing flowables are happy.""" self._indexingFlowables = [] #scan the story and keep a copy for thing in story: if thing.isIndexing(): self._indexingFlowables.append(thing) #print 'scanned story, found these indexing flowables:\n' #print self._indexingFlowables
f8673ba8e560fe4484d79a13134260bddfce5406 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/f8673ba8e560fe4484d79a13134260bddfce5406/doctemplate.py
def multiBuild(self, story, filename=None, canvasmaker=canvas.Canvas, maxPasses = 10): """Makes multiple passes until all indexing flowables are happy.""" self._indexingFlowables = [] #scan the story and keep a copy for thing in story: if thing.isIndexing(): self._indexingFlowables.append(thing) #print 'scanned story, found these indexing flowables:\n' #print self._indexingFlowables
f8673ba8e560fe4484d79a13134260bddfce5406 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/f8673ba8e560fe4484d79a13134260bddfce5406/doctemplate.py
parentValue = getattr(self, key) if parentValue <> value:
if not hasattr(self,key) or getattr(self, key)<>value:
def getProperties(self,recur=1): # return any children which are defined and whatever # differs from the parent props = {}
694507df90b53a86855d1a38f6f4355a990709a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/694507df90b53a86855d1a38f6f4355a990709a9/widgetbase.py
def getProperties(self,recur=1): # return any children which are defined and whatever # differs from the parent props = {}
694507df90b53a86855d1a38f6f4355a990709a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/694507df90b53a86855d1a38f6f4355a990709a9/widgetbase.py
if type(abf) not in (TupleType,ListType): i0 = i1 = valueStep*abf else: i0 = valueStep*abf[0] i1 = valueStep*abf[1]
i0 = valueStep*abf[0] i1 = valueStep*abf[1]
def _setRange(self, dataSeries): """Set minimum and maximum axis values.
8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1/axes.py
if _n - T[0] < i0-fuzz: valueMin = valueMin - i0 if T[-1]-_x < i1-fuzz: valueMax = valueMax + i1
if abs(T[0])>fuzz and _n - T[0] < i0-fuzz: valueMin = valueMin - i0 if abs(T[-1])>fuzz and T[-1]-_x < i1-fuzz: valueMax = valueMax + i1
def _setRange(self, dataSeries): """Set minimum and maximum axis values.
8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8c19d7fdb8e0ecc83d57c5df905a1a441b6d9dc1/axes.py
name = md5.md5('%s%s' % (image, mask)).hexdigest()
name = _digester('%s%s' % (image, mask))
def drawImage(self, image, x, y, width=None, height=None, mask=None): """Draws the image (PIL Image object or filename) as specified.
a6543538ff2b057fdb5a4f42f266f9429ea08c8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a6543538ff2b057fdb5a4f42f266f9429ea08c8e/canvas.py
name = md5.md5(rawdata).hexdigest()
name = _digester(rawdata)
def drawImage(self, image, x, y, width=None, height=None, mask=None): """Draws the image (PIL Image object or filename) as specified.
a6543538ff2b057fdb5a4f42f266f9429ea08c8e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a6543538ff2b057fdb5a4f42f266f9429ea08c8e/canvas.py
if self._code[-1][-3:]==' Td':
if len(self._code) and self._code[-1][-3:]==' Td':
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[-1][-3:]==' Td': L = string.split(self._code[-1]) if len(L)==3: del self._code[-1] else: self._code[-1] = string.join(L[:-4]) if dx<>0 or dy<>0: self._code.append('%s Td' % fp_str(dx, -dy))
59cf356aa370c5f9a96eaeea39b4a2a886d92ac3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/59cf356aa370c5f9a96eaeea39b4a2a886d92ac3/textobject.py
from string import letters as LETTERS, whitespace as WHITESPACE, atoi
def Paragraph(text, style, bulletText=None, frags=None)
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
if text[0] in LETTERS:
from string import letters if text[0] in letters:
def readColor(text): """Read color names or tuples, RGB or CMYK, and return a Color object.""" if not text: return None from reportlab.lib import colors if text[0] in LETTERS: return colors.__dict__[text] tup = lengthSequence(text) msg = "Color tuple must have 3 (or 4) elements for RGB (or CMYC)." assert 3 <= len(tup) <= 4, msg msg = "Color tuple must have all elements <= 1.0." for i in range(len(tup)): assert tup[i] <= 1.0, msg if len(tup) == 3: colClass = colors.Color elif len(tup) == 4: colClass = colors.CMYKColor return apply(colClass, tup)
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
from string import whitespace
from string import whitespace, atoi, atoi_error
def handleSpecialCharacters(engine, text, program=None): from paraparser import greeks, symenc from string import whitespace standard={'lt':'<', 'gt':'>', 'amp':'&'} # add space prefix if space here if text[0:1] in whitespace: program.append(" ") #print "handling", repr(text) # shortcut if 0 and "&" not in text: result = [] for x in text.split(): result.append(x+" ") if result: last = result[-1] if text[-1:] not in whitespace: result[-1] = last.strip() program.extend(result) return program if program is None: program = [] amptext = text.split("&") first = 1 lastfrag = amptext[-1] for fragment in amptext: if not first: # check for special chars semi = fragment.find(";") if semi>0: name = fragment[:semi] if name[0]=='#': try: if name[1] == 'x': n = atoi(name[2:], 16) else: n = atoi(name[1:]) except atoi_error: n = -1 if 0<=n<=255: fragment = chr(n)+fragment[semi+1:] elif symenc.has_key(n): fragment = fragment[semi+1:] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(symenc[n]) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: fragment = "&"+fragment elif standard.has_key(name): fragment = standard[name]+fragment[semi+1:] elif greeks.has_key(name): fragment = fragment[semi+1:] greeksub = greeks[name] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(greeksub) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: # add back the & fragment = "&"+fragment else: # add back the & fragment = "&"+fragment # add white separated components of fragment followed by space sfragment = fragment.split() for w in sfragment[:-1]: program.append(w+" ") # does the last one need a space? if sfragment and fragment: # reader 3 used to go nuts if you don't special case the last frag, but it's fixed? if fragment[-1] in WHITESPACE: # or fragment==lastfrag: program.append( sfragment[-1]+" " ) else: last = sfragment[-1].strip() if last: #print "last is", repr(last) program.append( last ) first = 0 #print "HANDLED", program return program
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
if fragment and fragment[0] in WHITESPACE:
if fragment and fragment[0] in whitespace:
def handleSpecialCharacters(engine, text, program=None): from paraparser import greeks, symenc from string import whitespace standard={'lt':'<', 'gt':'>', 'amp':'&'} # add space prefix if space here if text[0:1] in whitespace: program.append(" ") #print "handling", repr(text) # shortcut if 0 and "&" not in text: result = [] for x in text.split(): result.append(x+" ") if result: last = result[-1] if text[-1:] not in whitespace: result[-1] = last.strip() program.extend(result) return program if program is None: program = [] amptext = text.split("&") first = 1 lastfrag = amptext[-1] for fragment in amptext: if not first: # check for special chars semi = fragment.find(";") if semi>0: name = fragment[:semi] if name[0]=='#': try: if name[1] == 'x': n = atoi(name[2:], 16) else: n = atoi(name[1:]) except atoi_error: n = -1 if 0<=n<=255: fragment = chr(n)+fragment[semi+1:] elif symenc.has_key(n): fragment = fragment[semi+1:] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(symenc[n]) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: fragment = "&"+fragment elif standard.has_key(name): fragment = standard[name]+fragment[semi+1:] elif greeks.has_key(name): fragment = fragment[semi+1:] greeksub = greeks[name] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(greeksub) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: # add back the & fragment = "&"+fragment else: # add back the & fragment = "&"+fragment # add white separated components of fragment followed by space sfragment = fragment.split() for w in sfragment[:-1]: program.append(w+" ") # does the last one need a space? if sfragment and fragment: # reader 3 used to go nuts if you don't special case the last frag, but it's fixed? if fragment[-1] in WHITESPACE: # or fragment==lastfrag: program.append( sfragment[-1]+" " ) else: last = sfragment[-1].strip() if last: #print "last is", repr(last) program.append( last ) first = 0 #print "HANDLED", program return program
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
if fragment and fragment[0] in WHITESPACE:
if fragment and fragment[0] in whitespace:
def handleSpecialCharacters(engine, text, program=None): from paraparser import greeks, symenc from string import whitespace standard={'lt':'<', 'gt':'>', 'amp':'&'} # add space prefix if space here if text[0:1] in whitespace: program.append(" ") #print "handling", repr(text) # shortcut if 0 and "&" not in text: result = [] for x in text.split(): result.append(x+" ") if result: last = result[-1] if text[-1:] not in whitespace: result[-1] = last.strip() program.extend(result) return program if program is None: program = [] amptext = text.split("&") first = 1 lastfrag = amptext[-1] for fragment in amptext: if not first: # check for special chars semi = fragment.find(";") if semi>0: name = fragment[:semi] if name[0]=='#': try: if name[1] == 'x': n = atoi(name[2:], 16) else: n = atoi(name[1:]) except atoi_error: n = -1 if 0<=n<=255: fragment = chr(n)+fragment[semi+1:] elif symenc.has_key(n): fragment = fragment[semi+1:] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(symenc[n]) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: fragment = "&"+fragment elif standard.has_key(name): fragment = standard[name]+fragment[semi+1:] elif greeks.has_key(name): fragment = fragment[semi+1:] greeksub = greeks[name] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(greeksub) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: # add back the & fragment = "&"+fragment else: # add back the & fragment = "&"+fragment # add white separated components of fragment followed by space sfragment = fragment.split() for w in sfragment[:-1]: program.append(w+" ") # does the last one need a space? if sfragment and fragment: # reader 3 used to go nuts if you don't special case the last frag, but it's fixed? if fragment[-1] in WHITESPACE: # or fragment==lastfrag: program.append( sfragment[-1]+" " ) else: last = sfragment[-1].strip() if last: #print "last is", repr(last) program.append( last ) first = 0 #print "HANDLED", program return program
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
if fragment[-1] in WHITESPACE:
if fragment[-1] in whitespace:
def handleSpecialCharacters(engine, text, program=None): from paraparser import greeks, symenc from string import whitespace standard={'lt':'<', 'gt':'>', 'amp':'&'} # add space prefix if space here if text[0:1] in whitespace: program.append(" ") #print "handling", repr(text) # shortcut if 0 and "&" not in text: result = [] for x in text.split(): result.append(x+" ") if result: last = result[-1] if text[-1:] not in whitespace: result[-1] = last.strip() program.extend(result) return program if program is None: program = [] amptext = text.split("&") first = 1 lastfrag = amptext[-1] for fragment in amptext: if not first: # check for special chars semi = fragment.find(";") if semi>0: name = fragment[:semi] if name[0]=='#': try: if name[1] == 'x': n = atoi(name[2:], 16) else: n = atoi(name[1:]) except atoi_error: n = -1 if 0<=n<=255: fragment = chr(n)+fragment[semi+1:] elif symenc.has_key(n): fragment = fragment[semi+1:] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(symenc[n]) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: fragment = "&"+fragment elif standard.has_key(name): fragment = standard[name]+fragment[semi+1:] elif greeks.has_key(name): fragment = fragment[semi+1:] greeksub = greeks[name] (f,b,i) = engine.shiftfont(program, face="symbol") program.append(greeksub) engine.shiftfont(program, face=f) if fragment and fragment[0] in WHITESPACE: program.append(" ") # follow with a space else: # add back the & fragment = "&"+fragment else: # add back the & fragment = "&"+fragment # add white separated components of fragment followed by space sfragment = fragment.split() for w in sfragment[:-1]: program.append(w+" ") # does the last one need a space? if sfragment and fragment: # reader 3 used to go nuts if you don't special case the last frag, but it's fixed? if fragment[-1] in WHITESPACE: # or fragment==lastfrag: program.append( sfragment[-1]+" " ) else: last = sfragment[-1].strip() if last: #print "last is", repr(last) program.append( last ) first = 0 #print "HANDLED", program return program
c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c17f50bceefabbdbad5fd4e7b9aab4c4d6415ccb/para.py
stripped = string.strip(text) lines = string.split(stripped, '\n') trimmed_lines = map(string.lstrip, lines) return string.join(trimmed_lines, joiner)
L = map(_lineClean, split(text, '\n')) return join(L, joiner) def setXPos(tx,dx): if dx>1e-6 or dx<-1e-6: tx.setXPos(dx)
def cleanBlockQuotedText(text,joiner=' '): """This is an internal utility which takes triple- quoted text form within the document and returns (hopefully) the paragraph the user intended originally.""" stripped = string.strip(text) lines = string.split(stripped, '\n') trimmed_lines = map(string.lstrip, lines) return string.join(trimmed_lines, joiner)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(offset) tx._textOut(string.join(words),1)
setXPos(tx,offset) tx._textOut(join(words),1) setXPos(tx,-offset)
def _leftDrawParaLine( tx, offset, extraspace, words, last=0): tx.setXPos(offset) tx._textOut(string.join(words),1)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(m) tx._textOut(string.join(words),1)
setXPos(tx,m) tx._textOut(join(words),1) setXPos(tx,-m)
def _centerDrawParaLine( tx, offset, extraspace, words, last=0): m = offset + 0.5 * extraspace tx.setXPos(m) tx._textOut(string.join(words),1)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(m) tx._textOut(string.join(words),1)
setXPos(tx,m) tx._textOut(join(words),1) setXPos(tx,-m)
def _rightDrawParaLine( tx, offset, extraspace, words, last=0): m = offset + extraspace tx.setXPos(m) tx._textOut(string.join(words),1)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(offset) text = string.join(words)
setXPos(tx,offset) text = join(words)
def _justifyDrawParaLine( tx, offset, extraspace, words, last=0): tx.setXPos(offset) text = string.join(words) if last: #last one, left align tx._textOut(text,1) else: nSpaces = len(words)-1 if nSpaces: tx.setWordSpace(extraspace / float(nSpaces)) tx._textOut(text,1) tx.setWordSpace(0) else: tx._textOut(text,1)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(offset)
setXPos(tx,offset)
def _leftDrawParaLineX( tx, offset, line, last=0): tx.setXPos(offset) _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(m)
setXPos(tx,m)
def _centerDrawParaLineX( tx, offset, line, last=0): m = offset+0.5*line.extraSpace tx.setXPos(m) _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(m)
setXPos(tx,m)
def _rightDrawParaLineX( tx, offset, line, last=0): m = offset+line.extraSpace tx.setXPos(m) _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(offset)
def _justifyDrawParaLineX( tx, offset, line, last=0): if last: #last one, left align tx.setXPos(offset) _putFragLine(tx, line.words) else: tx.setXPos(offset) nSpaces = line.wordCount - 1 if nSpaces: tx.setWordSpace(line.extraSpace / float(nSpaces)) _putFragLine(tx, line.words) tx.setWordSpace(0) else: _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
tx.setXPos(offset)
def _justifyDrawParaLineX( tx, offset, line, last=0): if last: #last one, left align tx.setXPos(offset) _putFragLine(tx, line.words) else: tx.setXPos(offset) nSpaces = line.wordCount - 1 if nSpaces: tx.setWordSpace(line.extraSpace / float(nSpaces)) _putFragLine(tx, line.words) tx.setWordSpace(0) else: _putFragLine(tx, line.words)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
S = string.split(text,' ')
S = split(text,' ')
def _getFragWords(frags): ''' given a Parafrag list return a list of fragwords [[size, (f00,w00), ..., (f0n,w0n)],....,[size, (fm0,wm0), ..., (f0n,wmn)]] each pair f,w represents a style and some string each sublist represents a word ''' R = [] W = [] n = 0 for f in frags: text = f.text #del f.text # we can't do this until we sort out splitting # of paragraphs if text!='': S = string.split(text,' ') if S[-1]=='': del S[-1] if W!=[] and text[0] in [' ','\t']: W.insert(0,n) R.append(W) W = [] n = 0 for w in S[:-1]: W.append((f,w)) n = n + stringWidth(w, f.fontName, f.fontSize) W.insert(0,n) R.append(W) W = [] n = 0 w = S[-1] W.append((f,w)) n = n + stringWidth(w, f.fontName, f.fontSize) if text[-1] in [' ','\t']: W.insert(0,n) R.append(W) W = [] n = 0 elif hasattr(f,'cbDefn'): if W!=[]: W.insert(0,n) R.append(W) W = [] n = 0 R.append([0,(f,'')]) if W!=[]: W.insert(0,n) R.append(W) return R
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize)
bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize)
def _handleBulletWidth(bulletText,style,maxWidths): '''work out bullet width and adjust maxWidths[0] if neccessary ''' if bulletText <> None: if type(bulletText) is StringType: bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize) else: #it's a list of fragments bulletWidth = 0 for f in bulletText: bulletWidth = bulletWidth + stringWidth(f.text, f.fontName, f.fontSize) bulletRight = style.bulletIndent + bulletWidth if bulletRight > style.firstLineIndent: #..then it overruns, and we have less space available on line 1 maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
if bulletRight > style.firstLineIndent:
indent = style.leftIndent+style.firstLineIndent if bulletRight > indent:
def _handleBulletWidth(bulletText,style,maxWidths): '''work out bullet width and adjust maxWidths[0] if neccessary ''' if bulletText <> None: if type(bulletText) is StringType: bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize) else: #it's a list of fragments bulletWidth = 0 for f in bulletText: bulletWidth = bulletWidth + stringWidth(f.text, f.fontName, f.fontSize) bulletRight = style.bulletIndent + bulletWidth if bulletRight > style.firstLineIndent: #..then it overruns, and we have less space available on line 1 maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent)
maxWidths[0] = maxWidths[0] - (bulletRight - indent)
def _handleBulletWidth(bulletText,style,maxWidths): '''work out bullet width and adjust maxWidths[0] if neccessary ''' if bulletText <> None: if type(bulletText) is StringType: bulletWidth = stringWidth( bulletText, style.bulletFontName, style.bulletFontSize) else: #it's a list of fragments bulletWidth = 0 for f in bulletText: bulletWidth = bulletWidth + stringWidth(f.text, f.fontName, f.fontSize) bulletRight = style.bulletIndent + bulletWidth if bulletRight > style.firstLineIndent: #..then it overruns, and we have less space available on line 1 maxWidths[0] = maxWidths[0] - (bulletRight - style.firstLineIndent)
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
first_line_width = availWidth - self.style.firstLineIndent - self.style.rightIndent later_widths = availWidth - self.style.leftIndent - self.style.rightIndent
leftIndent = self.style.leftIndent first_line_width = availWidth - (leftIndent+self.style.firstLineIndent) - self.style.rightIndent later_widths = availWidth - leftIndent - self.style.rightIndent
def wrap(self, availWidth, availHeight): # work out widths array for breaking self.width = availWidth first_line_width = availWidth - self.style.firstLineIndent - self.style.rightIndent later_widths = availWidth - self.style.leftIndent - self.style.rightIndent self.blPara = self.breakLines([first_line_width, later_widths]) self.height = len(self.blPara.lines) * self.style.leading
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
def wrap(self, availWidth, availHeight): # work out widths array for breaking self.width = availWidth first_line_width = availWidth - self.style.firstLineIndent - self.style.rightIndent later_widths = availWidth - self.style.leftIndent - self.style.rightIndent self.blPara = self.breakLines([first_line_width, later_widths]) self.height = len(self.blPara.lines) * self.style.leading
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
if style.firstLineIndent != style.leftIndent:
if style.firstLineIndent != 0:
def split(self,availWidth, availHeight): if len(self.frags)<=0: return []
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
style.firstLineIndent = style.leftIndent
style.firstLineIndent = 0
def split(self,availWidth, availHeight): if len(self.frags)<=0: return []
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
maxWidth = maxWidths[lineno]
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word list
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
words = hasattr(f,'text') and string.split(f.text, ' ') or f.words
words = hasattr(f,'text') and split(f.text, ' ') or f.words
def breakLines(self, width): """ Returns a broken line structure. There are two cases A) For the simple case of a single formatting input fragment the output is A fragment specifier with kind = 0 fontName, fontSize, leading, textColor lines= A list of lines Each line has two items. 1) unused width in points 2) word list
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
canvas.addLiteral('%% %s.drawPara' % _className(self))
def drawPara(self,debug=0): """Draws a paragraph according to the given style. Returns the final y position at the bottom. Not safe for paragraphs without spaces e.g. Japanese; wrapping algorithm will go infinite."""
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
offset = style.firstLineIndent - style.leftIndent
offset = style.firstLineIndent
def drawPara(self,debug=0): """Draws a paragraph according to the given style. Returns the final y position at the bottom. Not safe for paragraphs without spaces e.g. Japanese; wrapping algorithm will go infinite."""
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
return string.join(plains, '')
return join(plains, '')
def getPlainText(self): """Convenience function for templates which want access to the raw text, without XML tags. """ plains = [] for frag in self.frags: plains.append(frag.text) return string.join(plains, '')
b2cf1e4f93a7f349035e282e7cc45fb5c48720b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/b2cf1e4f93a7f349035e282e7cc45fb5c48720b0/paragraph.py
image = PIL_Image.open(cStringIO.StringIO(str(logo.data))) (width, height) = image.size
image = ImageReader(cStringIO.StringIO(str(logo.data))) (width, height) = image.getSize()
def getImageFromZODB(self, name) : """Retrieves an Image from the ZODB, converts it to PIL, and makes it 0.75 inch high. """ try : # try to get it from ZODB logo = getattr(self.parent.context, name) except AttributeError : # not found ! return None
0c18cee620bd323e19e6de2f71e10ca4c6e2b7a6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/0c18cee620bd323e19e6de2f71e10ca4c6e2b7a6/rlzope.py
style.bulletFontSize=12
style.bulletFontSize=12
def check_text(text,p=_parser): print '##########' text = cleanBlockQuotedText(text) l,rv,bv = p.parse(text,style) if rv is None: for l in _parser.errors: print l else: print 'ParaStyle', l.fontName,l.fontSize,l.textColor for l in rv: print l.fontName,l.fontSize,l.textColor,l.bold, l.rise, '|%s|'%l.text[:25], if hasattr(l,'cbDefn'): print 'cbDefn',l.cbDefn.name,l.cbDefn.label,l.cbDefn.kind else: print
8b615de3a4709de8d458a212475366efedb91c1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8b615de3a4709de8d458a212475366efedb91c1e/paraparser.py
print vm, vM, y, scale, self.valueAxis._y, self.valueAxis._valueMin, self._findMinMaxValues()[0]
def calcBarPositions(self): """Works out where they go. default vertical.
a259d2e5fb5d910c0463a736bc341a7f91f6875c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/a259d2e5fb5d910c0463a736bc341a7f91f6875c/barcharts.py
version="1.15.3",
version="1.17", licence="BSD license, Copyright (c) 2000-2003, ReportLab Inc.",
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
package_dir = {'': '..'},
package_dir = {'reportlab': '.'},
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
'reportlab.docs.images',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
'reportlab.fonts',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )],
'reportlab.test', 'reportlab.tools', 'reportlab.tools.docco', 'reportlab.tools.py2pdf', 'reportlab.tools.pythonpoint', 'reportlab.tools.pythonpoint.demos', 'reportlab.tools.pythonpoint.styles', ], data_files = [(pjoin(package_path, 'docs', 'images'), ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), (pjoin(package_path, 'fonts'), ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf']), (package_path, ['README', 'changes', 'license.txt']), (pjoin(package_path, 'test'), ['test/pythonpowered.gif',]), (pjoin(package_path, 'lib'), ['lib/hyphen.mashed',]), ],
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
ext_modules = [Extension( '_rl_accel',
ext_modules = [Extension( 'reportlab/lib/_rl_accel',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
Extension( 'sgmlop',
Extension( 'reportlab/lib/sgmlop',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
Extension( 'pyHnj',
Extension( 'reportlab/lib/pyHnj',
def run(): LIBS = [] setup( name="Reportlab", version="1.15.3", description="Reportlab PDF generation tools", author="The boys from SW19", author_email="[email protected]", url="http://www.reportlab.com/", package_dir = {'': '..'}, packages=[ # include anything with an __init__ 'reportlab', 'reportlab.docs', 'reportlab.docs.graphguide', 'reportlab.docs.images', 'reportlab.docs.reference', 'reportlab.docs.userguide', 'reportlab.fonts', 'reportlab.graphics', 'reportlab.graphics.charts', 'reportlab.graphics.widgets', 'reportlab.lib', 'reportlab.pdfbase', 'reportlab.pdfgen', 'reportlab.platypus', ], data_files = [('docs/images', ['docs/images/Edit_Prefs.gif', 'docs/images/Python_21.gif', 'docs/images/Python_21_HINT.gif', 'docs/images/fileExchange.gif', 'docs/images/jpn.gif', 'docs/images/jpnchars.jpg', 'docs/images/lj8100.jpg', 'docs/images/replogo.a85', 'docs/images/replogo.gif']), ('fonts', ['fonts/LeERC___.AFM', 'fonts/LeERC___.PFB', 'fonts/luxiserif.ttf', 'fonts/rina.ttf'] )], ext_modules = [Extension( '_rl_accel', ['lib/_rl_accel.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'sgmlop', ['lib/sgmlop.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), Extension( 'pyHnj', ['lib/pyHnjmodule.c', 'lib/hyphen.c', 'lib/hnjalloc.c'], include_dirs=[], define_macros=[], library_dirs=[], libraries=LIBS, # libraries to link against ), ], )
19171ca0c12e27376e1b3eff31b51a8a1a52e78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/19171ca0c12e27376e1b3eff31b51a8a1a52e78e/setup.py
unittest.TextTestRunner().run(makeSuite())
if '-debug' in sys.argv: run() else: unittest.TextTestRunner().run(makeSuite())
def makeSuite(): suite = unittest.TestSuite() suite.addTest(PlatypusTestCase('test1')) return suite
d4416166c810994c9fddb52037b50adb50274eaf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d4416166c810994c9fddb52037b50adb50274eaf/test_platypus_general.py
deltas['transform'] = [1,0,0,1,x,y]
deltas['transform'] = canvas._baseCTM[0:4]+(x,y)
def draw(self, drawing, canvas, x=0, y=0, showBoundary=rl_config.showBoundary): """This is the top level function, which draws the drawing at the given location. The recursive part is handled by drawNode.""" #stash references for ease of communication self._canvas = canvas canvas.__dict__['_drawing'] = self._drawing = drawing try: if showBoundary: canvas.rect(x, y, drawing.width, drawing.height) canvas.saveState() deltas = STATE_DEFAULTS.copy() deltas['transform'] = [1,0,0,1,x,y] self._tracker.push(deltas) self.applyState() self.drawNode(drawing) self.pop() canvas.restoreState() finally: #remove any circular references del self._canvas, self._drawing, canvas._drawing
98e162ca9ebd2996bb98f978efcc879df0977225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/98e162ca9ebd2996bb98f978efcc879df0977225/renderPM.py
w = int(d.width+0.5) h = int(d.height+0.5)
w = int(d.width*dpi/72.0+0.5) h = int(d.height*dpi/72.0+0.5)
def drawToPMCanvas(d, dpi=72, bg=0xffffff, configPIL=None, showBoundary=rl_config.showBoundary): w = int(d.width+0.5) h = int(d.height+0.5) c = PMCanvas(w, h, dpi=dpi, bg=bg, configPIL=configPIL) draw(d, c, 0, 0) return c
98e162ca9ebd2996bb98f978efcc879df0977225 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/98e162ca9ebd2996bb98f978efcc879df0977225/renderPM.py
lineBreakPrev = False
def breakLines(self, width): """ Returns a broken line structure. There are two cases
8d23a394d71e94269f4f4a0be1e036155775a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d23a394d71e94269f4f4a0be1e036155775a4c8/paragraph.py
endLine = (newWidth>maxWidth and n>0) or (lineBreak and (currentWidth>0 or lineBreakPrev))
endLine = (newWidth>maxWidth and n>0) or lineBreak
def breakLines(self, width): """ Returns a broken line structure. There are two cases
8d23a394d71e94269f4f4a0be1e036155775a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d23a394d71e94269f4f4a0be1e036155775a4c8/paragraph.py
lineBreakPrev = lineBreak
def breakLines(self, width): """ Returns a broken line structure. There are two cases
8d23a394d71e94269f4f4a0be1e036155775a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d23a394d71e94269f4f4a0be1e036155775a4c8/paragraph.py
while hasattr(words[i],'cbDefn'): i = i-1
while hasattr(words[i],'cbDefn'): i -= 1
def breakLines(self, width): """ Returns a broken line structure. There are two cases
8d23a394d71e94269f4f4a0be1e036155775a4c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/8d23a394d71e94269f4f4a0be1e036155775a4c8/paragraph.py