pytuflow.TCFRunState.run#
- TCFRunState.run(tuflow_bin, prec='sp', add_cli_args=(), *args, **kwargs)#
Run the control file in context using the specified TUFLOW binary.
TUFLOW binary can be a file path to the executable or a version name that has been registered using the
register_tuflow_binary function()
or theregister_tuflow_binary_folder()
.
Additional arguments can be passed in and will be passed to the subprocess.Popen() call. By default, a new console will be created for the subprocess.
- Parameters:
tuflow_bin (PathLike) – Path to the TUFLOW binary or a registered version name.
prec (str, optional) – Precision of the run. Default is
"sp"
(single precision). Alternate option is"dp"
(double precision) (accepted aliases"idp"
and"double"
).add_cli_args (list[str]) – A list of additional command line arguments specific to TUFLOW that will be passed directly to the subprocess.Popen() call. e.g.
add_tf_flags=['-t']
to pass in the-t
flag to run TUFLOW in test mode.*args – Will be passed to subprocess.Popen() call.
**kwargs – Will be passed to subprocess.Popen() call.
- Returns:
The subprocess.Popen object that is created when the control file is run.
- Return type:
subprocess.Popen
Examples
>>> tcf = ... # assuming is an instance of TCF >>> tcf.context().run('2025.1.2') <Popen: returncode: None args: ['C:\TUFLOW\releases\2025.1.2\TUFLOW_iSP_...>