__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.85: ~ $
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
"""
This does a test drawing with lots of things in it, running
with and without attribute checking.
"""
__version__ = '''$Id$'''
from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation
setOutDir(__name__)
import os, sys, time
import reportlab.rl_config
import unittest
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.pdfgen.canvas import Canvas
from reportlab.pdfbase.pdfmetrics import stringWidth
from reportlab.platypus import Flowable
from reportlab.graphics.shapes import *
from reportlab.graphics.charts.piecharts import Pie


class GraphicsSpeedTestCase(unittest.TestCase):
    "Test speed of the graphics rendering process."

    def test0(self, isFast=0):
        """Hello World, on a rectangular background.

        The rectangle's fillColor is yellow.
        The string's fillColor is red.
        """
        reportlab.rl_config.shapeChecking = not isFast

        pdfPath = outputfile('test_graphics_speed_fast.pdf')
        c = Canvas(pdfPath)
        t0 = time.time()

        d = Drawing(400, 200)
        num = 100
        for i in range(num):
            pc = Pie()
            pc.x = 150
            pc.y = 50
            pc.data = [10,20,30,40,50,60]
            pc.labels = ['a','b','c','d','e','f']
            pc.slices.strokeWidth=0.5
            pc.slices[3].popout = 20
            pc.slices[3].strokeWidth = 2
            pc.slices[3].strokeDashArray = [2,2]
            pc.slices[3].labelRadius = 1.75
            pc.slices[3].fontColor = colors.red
            d.add(pc)
        d.drawOn(c, 80, 500)

        t1 = time.time()

        result = 'drew %d pie charts in %0.4f' % (num, t1 - t0)
        open(outputfile('test_graphics_speed_test%s.log' % (isFast+1)), 'w').write(result)

    def test1(self, isFast=1):
        "Same as test1(), but with shape checking turned on."
        self.test0(isFast)

    if False:
        def test2(self):
            "This is a profiled version of test1()."
            try:
                import profile
            except ImportError:
                return
            fileName = outputfile('test_graphics_speed_profile.log')
            # This runs ok, when only this test script is executed,
            # but fails, when imported from runAll.py...
            profile.run("t = GraphicsSpeedTestCase('test2')", fileName)

def makeSuite():
    return makeSuiteForClasses(GraphicsSpeedTestCase)


#noruntests
if __name__ == "__main__":
    unittest.TextTestRunner().run(makeSuite())
    printLocation()

Filemanager

Name Type Size Permission Actions
barcode-out Folder 0755
charts-out Folder 0755
render-out Folder 0755
00readme.txt File 913 B 0644
__init__.py File 80 B 0644
_i_am_actually_a_gif.jpg File 1.05 KB 0644
_i_am_actually_a_jpeg.gif File 12.17 KB 0644
alpha_test.png File 3.72 KB 0644
encryption.gif File 2.91 KB 0644
gray-alpha.png File 1.86 KB 0644
pythonpowered-gs.gif File 1.85 KB 0644
pythonpowered.gif File 1.05 KB 0644
rltw-icon-tr.png File 6.35 KB 0644
runAll.py.gz File 2.04 KB 0644
solid_red_alpha.png File 2.35 KB 0644
tall_red.png File 172 B 0644
test-cross.tiff File 288 B 0644
test-indexed.png File 168 B 0644
test-rgba.png File 157 B 0644
test_charts_textlabels.py.gz File 2.15 KB 0644
test_crypto_algorithms.py.gz File 1.94 KB 0644
test_docs_build.py File 1.43 KB 0644
test_docstrings.py.gz File 2.04 KB 0644
test_extra.py File 2.99 KB 0644
test_geomutils.py File 956 B 0644
test_graphics_barcode.py.gz File 4.17 KB 0644
test_graphics_charts.py.gz File 8.22 KB 0644
test_graphics_images-cairo.gif File 32.01 KB 0644
test_graphics_images-cairo.png File 45.75 KB 0644
test_graphics_images-libart.gif File 15.17 KB 0644
test_graphics_images-libart.png File 20.85 KB 0644
test_graphics_images.gif File 32.01 KB 0644
test_graphics_images.png File 45.75 KB 0644
test_graphics_images.py.gz File 1.72 KB 0644
test_graphics_layout.py File 2.46 KB 0644
test_graphics_render.py.gz File 2.68 KB 0644
test_graphics_speed.py File 2.57 KB 0644
test_hello.py File 1.85 KB 0644
test_images.py File 2.55 KB 0644
test_invariant.py File 2.47 KB 0644
test_issues.py.gz File 1.49 KB 0644
test_lib_colors.py.gz File 2.26 KB 0644
test_lib_normaldate.py.gz File 1.52 KB 0644
test_lib_pdfencrypt.py.gz File 1.79 KB 0644
test_lib_rl_safe_eval.py.gz File 2.92 KB 0644
test_lib_sequencer.py File 3.66 KB 0644
test_lib_utils.py.gz File 3.43 KB 0644
test_lib_validators.py.gz File 1.4 KB 0644
test_multibyte_chs.py File 2.39 KB 0644
test_multibyte_cht.py.gz File 1.84 KB 0644
test_multibyte_jpn.py.gz File 6.19 KB 0644
test_multibyte_kor.py.gz File 2.27 KB 0644
test_paragraphs.py.gz File 6.28 KB 0644
test_pdfbase_encodings.py.gz File 3.34 KB 0644
test_pdfbase_fontembed.py File 3.78 KB 0644
test_pdfbase_pdfdoc.py File 2.65 KB 0644
test_pdfbase_pdfform.py.gz File 2.22 KB 0644
test_pdfbase_pdfmetrics.py.gz File 1.6 KB 0644
test_pdfbase_pdfutils.py File 1.57 KB 0644
test_pdfbase_postscript.py File 3.11 KB 0644
test_pdfbase_ttfonts.py.gz File 9.57 KB 0644
test_pdfgen_callback.py File 991 B 0644
test_pdfgen_general.py.gz File 12.59 KB 0644
test_pdfgen_links.py.gz File 1.9 KB 0644
test_pdfgen_overprint.py File 3.06 KB 0644
test_pdfgen_pagemodes.py File 1.81 KB 0644
test_platypus_accum.py File 3.09 KB 0644
test_platypus_breaking.py.gz File 6.5 KB 0644
test_platypus_cjk_wrap.py.gz File 2.04 KB 0644
test_platypus_general.py.gz File 9.34 KB 0644
test_platypus_images.py File 4 KB 0644
test_platypus_indents.py.gz File 2.06 KB 0644
test_platypus_index.py.gz File 2.05 KB 0644
test_platypus_leftright.py.gz File 1.79 KB 0644
test_platypus_lists.py.gz File 2.95 KB 0644
test_platypus_paragraphs.py.gz File 20.24 KB 0644
test_platypus_paraparser.py.gz File 1.26 KB 0644
test_platypus_pleaseturnover.py.gz File 3.15 KB 0644
test_platypus_preformatted.py.gz File 2.71 KB 0644
test_platypus_programming.py.gz File 1.96 KB 0644
test_platypus_tables.py.gz File 10.17 KB 0644
test_platypus_toc.py.gz File 3.99 KB 0644
test_platypus_wrapping.py File 3.68 KB 0644
test_platypus_xref.py.gz File 1.96 KB 0644
test_pyfiles.py.gz File 1.67 KB 0644
test_renderPS.py.gz File 1.78 KB 0644
test_renderSVG.py.gz File 2.07 KB 0644
test_rl_accel.py.gz File 2.82 KB 0644
test_source_chars.py File 3.34 KB 0644
test_table_inrowsplit.py.gz File 3.48 KB 0644
test_table_layout.py.gz File 7.77 KB 0644
test_tools_pythonpoint.py File 1.21 KB 0644
test_utils.py File 1.32 KB 0644
test_widgetbase_tpc.py.gz File 1.34 KB 0644
test_widgets_grids.py.gz File 1.37 KB 0644
unimportable.py File 166 B 0644
Filemanager