Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(30)  |  Call(16)  |  Derive(0)  |  Import(14)

            def asNative(v,enc='utf8'):
        return asBytes(v,enc=enc)
        


src/r/e/reportlab-3.1.8/src/reportlab/graphics/renderPS.py   reportlab(Download)
 
from reportlab.pdfbase.pdfmetrics import getFont, stringWidth, unicode2T1 # for font info
from reportlab.lib.utils import getBytesIO, getStringIO, asBytes, char2int, rawBytes, asNative, isUnicode
from reportlab.lib.rl_accel import fp_str
from reportlab.lib.colors import black
        for f, t in unicode2T1(s,[fontObj]+fontObj.substitutionFonts):
            if f!=fc:
                psName = asNative(f.face.name)
                code_append('(%s) findfont %s scalefont setfont' % (psName,fp_str(fontSize)))
                if psName not in fontsUsed:
    def drawString(self, x, y, s, angle=0):
        if self._fillColor != None:
            fontObj = getFont(self._font)
            if not self.code[self._fontCodeLoc]:
                psName = asNative(fontObj.face.name)

src/r/e/reportlab-3.1.8/src/reportlab/platypus/tables.py   reportlab(Download)
from reportlab.lib.styles import PropertySet, ParagraphStyle, _baseFontName
from reportlab.lib import colors
from reportlab.lib.utils import annotateException, IdentStr, flatten, isStr, asNative, strTypes
from reportlab.lib.rl_accel import fp_str
from reportlab.lib.abag import ABag as CellFrame
        def normCell(stuff):
            if stuff is None:
                return ''
            elif isStr(stuff):
                return asNative(stuff)

src/r/e/reportlab-3.1.8/src/reportlab/lib/colors.py   reportlab(Download)
from reportlab import isPy3
from reportlab.lib.rl_accel import fp_str
from reportlab.lib.utils import asNative, isStr
import collections
 
 
    if isStr(val):
        val = asNative(val)
        b = 10
        if val[:1] == '#':
            return len(arg)==3 and Color(arg[0],arg[1],arg[2]) or CMYKColor(arg[0],arg[1],arg[2],arg[3])
        elif isStr(arg):
            arg = asNative(arg)
            C = cssParse(arg)
            if C: return C

src/r/e/reportlab-3.1.8/src/reportlab/graphics/renderSVG.py   reportlab(Download)
from reportlab.lib.rl_accel import fp_str
from reportlab.lib.colors import black
from reportlab.lib.utils import asNative
from reportlab.graphics.renderbase import StateTracker, getStateDelta, Renderer, renderScaledDrawing
from reportlab.graphics.shapes import STATE_DEFAULTS, Path, UserNode
    def drawString(self, s, x, y, angle=0, link_info=None,**_svgAttrs):
        s = asNative(s)
        if self.verbose: print("+++ SVGCanvas.drawString")
 
        if self._fillColor != None:

src/r/e/reportlab-3.1.8/tools/pythonpoint/stdparser.py   reportlab(Download)
from tools.pythonpoint import pythonpoint
from reportlab.platypus import figures
from reportlab.lib.utils import asNative
 
 
    def handle_data(self, data):
        #the only data should be paragraph text, preformatted para
        #text, 'string text' for a fixed string on the page,
        #or table data
        data = asNative(data)

src/r/e/reportlab-3.1.8/src/reportlab/graphics/barcode/code39.py   reportlab(Download)
 
from reportlab.lib.units import inch
from reportlab.lib.utils import asNative
from reportlab.graphics.barcode.common import Barcode
from string import digits as string_digits
    def __init__(self, value = "", **args):
        value = asNative(value)
        for k, v in args.items():
            setattr(self, k, v)
 

src/r/e/reportlab-3.1.8/src/reportlab/graphics/barcode/usps.py   reportlab(Download)
from reportlab.graphics.barcode.common import Barcode
from string import digits as string_digits, whitespace as string_whitespace
from reportlab.lib.utils import asNative
 
_fim_patterns = {
    def __init__(self, value='', **args):
        value = str(value) if isinstance(value,int) else asNative(value)
        for k, v in args.items():
            setattr(self, k, v)
 
    def __init__(self, value='', **args):
        value = str(value) if isinstance(value,int) else asNative(value)
        for k, v in args.items():
            setattr(self, k, v)
 

src/r/e/reportlab-3.1.8/src/reportlab/graphics/barcode/usps4s.py   reportlab(Download)
from reportlab.lib.colors import black
from reportlab.graphics.barcode.common import Barcode
from reportlab.lib.utils import asNative
 
class USPS_4State(Barcode):
    def __init__(self,value='01234567094987654321',routing='',**kwd):
        self._init()
        value = str(value) if isinstance(value,int) else asNative(value)
        self._tracking = value
        self._routing = routing

src/r/e/reportlab-3.1.8/src/reportlab/graphics/barcode/qr.py   reportlab(Download)
from reportlab.graphics.charts.areas import PlotArea
from reportlab.lib.units import mm
from reportlab.lib.utils import asNative
try:
    from itertools import zip_longest
    def __init__(self,value='Hello World',**kw):
        value = str(value) if isinstance(value,int) else asNative(value)
        self.value=value
        for k, v in kw.items():
            setattr(self, k, v)

src/r/e/reportlab-3.1.8/src/reportlab/graphics/barcode/eanbc.py   reportlab(Download)
from reportlab.graphics.charts.areas import PlotArea
from reportlab.lib.units import mm
from reportlab.lib.utils import asNative
 
#work out a list of manufacturer codes....
    def __init__(self,value='123456789012',**kw):
        value = str(value) if isinstance(value,int) else asNative(value)
        self.value=max(self._digits-len(value),0)*'0'+value[:self._digits]
        for k, v in kw.items():
            setattr(self, k, v)

  1 | 2  Next