Ejemplo n.º 1
0
def load(path):
    """Load a object from the binary representation of it in the
    file, path"""

    fd = LocalFile(path, 'r')
    contents = fd.read()
    fd.close()
    return loads(contents)
Ejemplo n.º 2
0
def load(path):
    """Load a object from the binary representation of it in the
    file, path"""

    fd = LocalFile(path, "r")
    contents = fd.read()
    fd.close()
    return loads(contents)
Ejemplo n.º 3
0
def load(path):
    """Load a object from the binary representation of it in the
    file, path"""

    fd = distfile.DistFile(path, 'r')
    fd.lock(LOCK_SH)
    contents = fd.read()
    fd.unlock()
    fd.close()
    return loads(contents)
Ejemplo n.º 4
0
def load(path):
    """Load a object from the binary representation of it in the
    file, path"""

    fd = distfile.DistFile(path, 'r')
    fd.lock(LOCK_SH)
    contents = fd.read()
    fd.unlock()
    fd.close()
    return loads(contents)