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

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

        def dumps(obj, protocol=None):
    file = StringIO()
    Pickler(file, protocol).dump(obj)
    return file.getvalue()
        


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')

src/p/y/py-1.4.20/testing/root/test_error.py   py(Download)
def test_picklability_issue1():
    e1 = py.error.ENOENT()
    s = py.std.pickle.dumps(e1)
    e2 = py.std.pickle.loads(s)
    assert isinstance(e2, py.error.ENOENT)