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

All Samples(14)  |  Call(11)  |  Derive(0)  |  Import(3)
chr(i) -> character

Return a string of one character with ordinal i; 0 <= i < 256.

src/r/e/reportlab-3.1.8/src/reportlab/lib/pdfencrypt.py   reportlab(Download)
"""helpers for pdf encryption/decryption"""
import sys, os, tempfile
from reportlab.lib.utils import getBytesIO, md5, asBytes, int2Byte, char2int, rawUnicode, rawBytes, isPy3
from reportlab.pdfgen.canvas import Canvas
from reportlab.pdfbase import pdfutils
    for i in range(int(len(hexText)/2.0)):
        slice = hexText[i*2: i*2+2]
        char = int2Byte(eval('0x'+slice))
        out = out + char
    return out
        byte = (p & 0xff)    # seems to match what iText does
        p = p>>8
        permissionsString += int2Byte(byte % 256)
 
    hash = md5(asBytes(password))
    n = objectNumber
    for i in range(3):
        newkey += int2Byte(n & 0xff)
        n = n>>8
    # extend 2 bytes of the generationNumber
    n = generationNumber
    for i in range(2):
        newkey += int2Byte(n & 0xff)

src/r/e/reportlab-3.1.8/src/reportlab/lib/codecharts.py   reportlab(Download)
from reportlab.graphics.widgetbase import Widget
from reportlab.lib import colors
from reportlab.lib.utils import int2Byte
 
adobe2codec = {
            # it is an EUC family encoding.
            for col in range(1, 95):
                ch = int2Byte(row + 160) + int2Byte(col+160)
                cells.append(ch)
##        elif self.encodingName.find('GB') > -1:
                for x in range(16):
                    col = y*16+x
                    ch = int2Byte(row) + int2Byte(col)
                    cells.append(ch)
 

src/r/e/reportlab-3.1.8/tests/test_pdfbase_ttfonts.py   reportlab(Download)
                                      calcChecksum, add32
from reportlab import rl_config
from reportlab.lib.utils import getBytesIO, isPy3, uniChr, int2Byte
 
def utf8(code):
        font = TTFont("Vera", "Vera.ttf")
        text = b"".join(utf8(i) for i in range(511))
        allchars = b"".join(int2Byte(i) for i in range(256))
        nospace = allchars[:32] + allchars[33:]
        chunks = [(0, allchars), (1, nospace)]
 
        text = b"".join(utf8(i) for i in range(510, -1, -1))
        allchars = b"".join(int2Byte(i) for i in range(255, -1, -1))
        nospace = allchars[:223] + allchars[224:]
        chunks = [(1, nospace), (0, allchars)]