“Pandat Utility: Pandat Run” Module¶
A core module calling Pandat.exe
- class panpython.sdk.pandat_utility.pandat_run.WinCmdProcess_2(time_limit_in_min=15.0)[source]¶
Bases:
object
Run a batchfile calculation from Pandat console mode.
- Parameters:
time_limit_in_min (float, default=15.0) – time limit (minutes) for an exe run
Examples
>>> from panpython.sdk.pandat_utility.pandat_run import WinCmdProcess_2 >>> m_pandat_process: WinCmdProcess_2 = WinCmdProcess_2(time_limit_in_min=15.0) >>> run_list: str = '"' + 'pandat.exe' + '" "' + 'example_batchfile.pbfx' + '" "0"' >>> m_pandat_process.run_silent(run_list=run_list, ... task_id='0')
- get_elapsed_time() float [source]¶
Return elapsed time of exe
- Returns:
elapsed time of running Pandat.exe
- Return type:
float
- run_silent(run_list, task_id, mute=False, console_output='NULL') str [source]¶
Run exe in silent mode
- Parameters:
run_list (str) – the command list to run
task_id (str) – an task id from calling to track
mute (bool) – muting std output from Pandat run
console_output (str) – For saving the console output of Pandat run if needed. Defaults to “NULL” which wont save any file. Otherwise, name of file to store the console output should be given.
- Return type:
A string containing runtime info