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

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Encode a string into multiple lines of base-64 data.

        def encodestring(s):
    """Encode a string into multiple lines of base-64 data."""
    pieces = []
    for i in range(0, len(s), MAXBINSIZE):
        chunk = s[i : i + MAXBINSIZE]
        pieces.append(binascii.b2a_base64(chunk))
    return "".join(pieces)
        


src/n/u/nupic-linux64-HEAD/lib/python2.6/site-packages/_pytest/genscript.py   nupic-linux64(Download)
def compress_mapping(mapping):
    data = py.std.pickle.dumps(mapping, 2)
    data = py.std.zlib.compress(data, 9)
    data = py.std.base64.encodestring(data)
    data = data.decode('ascii')

src/p/y/pytest-2.5.2/_pytest/genscript.py   pytest(Download)
def compress_mapping(mapping):
    data = py.std.pickle.dumps(mapping, 2)
    data = py.std.zlib.compress(data, 9)
    data = py.std.base64.encodestring(data)
    data = data.decode('ascii')