copy_from_session#
- Session.copy_from_session(local_prefix: str, filelist: List[str], remote_prefix: str | None = None, progress: bool = False) list#
Copy a collection of files out of the EnSight session.
Copy files from the filesystem of the remote EnSight instance to the filesystem of the local PyEnsight instance.
Note
For a
LocalLauncheransys.pyensight.core.LocalLauncher>instance, these are the same filesystems.- Parameters:
- local_prefix
str URL prefix of the location to save the files to. The only protocol currently supported is
'file://', which is the local filesystem.- filelist
list - List of the files to copy. These files are prefixed
with
session.launcher.session_directory/remote_prefixand written relative to URL prefix specified for thelocal_prefixparameter.
- remote_prefix
str,optional Directory on the remote (EnSight) filesystem that is the source for the files. This prefix is appended to
session.launcher.session_directory.- progressbool,
optional Whether to show a progress bar. The default is
False. IfTrueand thetqdmmodule is available, a progress bar is shown.
- local_prefix
- Returns:
listList of the files that were copied.
Examples
>>> the_files = ["fluent_data_dir", "ensight_script.py"] >>> session.copy_from_session("file:///D:/restored_data", the_files, progress=True)
>>> the_files = ["fluent_data_dir", "ensight_script.py"] >>> session.copy_from_session("file:///scratch/restored_data", the_files, remote_prefix="data")