Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Python implementation of the od UNIX utility (od -b, more exactly).

Parameters
----------
filename: str
    name of the file to get the dump from.

Returns
-------
out: seq(more...)

        def pyod(filename):
    """Python implementation of the od UNIX utility (od -b, more exactly).

    Parameters
    ----------
    filename: str
        name of the file to get the dump from.

    Returns
    -------
    out: seq
        list of lines of od output
    Note
    ----
    We only implement enough to get the necessary information for long double
    representation, this is not intended as a compatible replacement for od.
    """
    def _pyod2():
        out = []

        fid = open(filename, 'rb')
        try:
            yo = [int(oct(int(binascii.b2a_hex(o), 16))) for o in fid.read()]
            for i in range(0, len(yo), 16):
                line = ['%07d' % int(oct(i))]
                line.extend(['%03d' % c for c in yo[i:i+16]])
                out.append(" ".join(line))
            return out
        finally:
            fid.close()

    def _pyod3():
        out = []

        fid = open(filename, 'rb')
        try:
            yo2 = [oct(o)[2:] for o in fid.read()]
            for i in range(0, len(yo2), 16):
                line = ['%07d' % int(oct(i)[2:])]
                line.extend(['%03d' % int(c) for c in yo2[i:i+16]])
                out.append(" ".join(line))
            return out
        finally:
            fid.close()

    if sys.version_info[0] < 3:
        return _pyod2()
    else:
        return _pyod3()
        


src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/python/Lib/site-packages/numpy/core/scons_support.py   Spherebot-Host-GUI(Download)
     do_generate_api as nowrap_do_generate_ufunc_api
from setup_common import check_api_version as _check_api_version
from setup_common import \
        LONG_DOUBLE_REPRESENTATION_SRC, pyod, long_double_representation
 
    if st:
        obj = str(context.sconf.lastTarget)
        tp = long_double_representation(pyod(obj))
        context.Result(msg[tp])
        return tp

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/core/scons_support.py   nupic-linux64(Download)
     do_generate_api as nowrap_do_generate_ufunc_api
from setup_common import check_api_version as _check_api_version
from setup_common import \
        LONG_DOUBLE_REPRESENTATION_SRC, pyod, long_double_representation
 
    if st:
        obj = str(context.sconf.lastTarget)
        tp = long_double_representation(pyod(obj))
        context.Result(msg[tp])
        return tp