コード例 #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)
コード例 #2
0
ファイル: localpickle.py プロジェクト: heromod/migrid
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)
コード例 #3
0
ファイル: distpickle.py プロジェクト: ucphhpc/migrid
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)
コード例 #4
0
ファイル: distpickle.py プロジェクト: heromod/migrid
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)