hpcflow.sdk.runtime.RunTimeInfo#

class hpcflow.sdk.runtime.RunTimeInfo(name, package_name, version, logger)#

Bases: object

Get useful run-time information, including the executable name used to invoke the CLI, in the case a PyInstaller-built executable was used.

sys_prefix#

From sys.prefix. If running in a virtual environment, this will point to the environment directory. If not running in a virtual environment, this will point to the Python installation root.

Type:

str

sys_base_prefix#

From sys.base_prefix. This will be equal to sys_prefix (sys.prefix) if not running within a virtual environment. However, if running within a virtual environment, this will be the Python installation directory, and sys_prefix will be equal to the virtual environment directory.

Type:

str

Methods

get_activate_env_command

get_deactivate_env_command

show

Attributes

executable_name

Get the name of the frozen app executable, if the app is frozen.

executable_path

Get the path that the user invoked to launch the frozen app, if the app is frozen.

invocation_command

Get the command that was used to invoke this instance of the app.

resolved_executable_name

Get the resolved name of the frozen app executable, if the app is frozen.

resolved_executable_path

Get the resolved path to the frozen app that the user launched, if the app is frozen.

resolved_script_path

Get the resolved path to the Python script used to invoked this instance of the app, if the app is not frozen.

script_path

Get the path to the Python script used to invoked this instance of the app, if the app is not frozen.

property executable_name#

Get the name of the frozen app executable, if the app is frozen.

If the user launches the app via a symbolic link, then this returns the name of that link, whereas resolved_executable_name returns the actual frozen app file name.

property executable_path#

Get the path that the user invoked to launch the frozen app, if the app is frozen.

If the user launches the app via a symbolic link, then this returns that link, whereas executable_path_resolved returns the actual frozen app path.

get_activate_env_command()#
get_deactivate_env_command()#
property invocation_command#

Get the command that was used to invoke this instance of the app.

property resolved_executable_name#

Get the resolved name of the frozen app executable, if the app is frozen.

property resolved_executable_path#

Get the resolved path to the frozen app that the user launched, if the app is frozen.

In a one-file app, this is the path to the bootloader. In the one-folder app, this is the path to the executable.

References

[1] https://pyinstaller.org/en/stable/runtime-information.html#using-sys-executable-and-sys-argv-0

property resolved_script_path: Path#

Get the resolved path to the Python script used to invoked this instance of the app, if the app is not frozen.

property script_path: Path#

Get the path to the Python script used to invoked this instance of the app, if the app is not frozen.

show()#