コード例 #1
0
ファイル: utilities.py プロジェクト: saiyanprince/pyimager
def build_available_list(listname):
    """
    This can be pushed to an IPython engine and run there to generate a list
    of data which is locally stored (and hence available for processing).
    """
    import os
    from IPython.kernel.engineservice import get_engine
    available = [
        filename for filename in filenames if os.access(filename, os.R_OK)
    ]
    properties = get_engine(id).properties
    properties[listname] = available
コード例 #2
0
ファイル: utilities.py プロジェクト: mfkiwl/lofar-1
def build_available_list(listname):
    """
    This can be pushed to an IPython engine and run there to generate a list
    of data which is locally stored (and hence available for processing).
    """
    import os
    from IPython.kernel.engineservice import get_engine
    available = [
        filename for filename in filenames if os.access(filename, os.R_OK)
    ]
    properties = get_engine(id).properties
    properties[listname] = available
コード例 #3
0
ファイル: utilities.py プロジェクト: saiyanprince/pyimager
def clear_available_list(listname):
    """
    Delete lists of locally stored data to free up resources on the engine.
    """
    from IPython.kernel.engineservice import get_engine
    del(get_engine(id).properties[listname])
コード例 #4
0
ファイル: utilities.py プロジェクト: mfkiwl/lofar-1
def clear_available_list(listname):
    """
    Delete lists of locally stored data to free up resources on the engine.
    """
    from IPython.kernel.engineservice import get_engine
    del (get_engine(id).properties[listname])