Skip to content

run_calls

Gus-prog edited this page Jul 14, 2022 · 8 revisions

run_calls

Class focused on the UDLF execution calls. As a rule, for UDLF to work properly it is necessary to have a binary and a configuration file. But pyUDLF allows other ways of execution, such as an input class or with a configuration file. It also makes sure that all the necessary files exist. All through this class.


Functions


bin_path

Udlf needs a binary file and a configuration file to work properly. This string variable variable contains the path to the binary file. If the user does not set a value for it, the default path is the user path. Used internally throughout pyUDLF.

Internal use.


config_path

Udlf needs a binary file and a configuration file to work properly. This string variable variable contains the path to the configuration file. If the user does not set a value for it, the default path is the user path. Used internally throughout pyUDLF.

Internal use.


setBinaryPath

Description:

Sets a new value for the "bin_path" variable that holds the path to the binary, accepting only string values.

Prototype:

  • setBinaryPath(path: string)

Parameters:

path -> new value for the binary path.

Return value:

There is no return.

Example:

TO DO


setConfigPath

Description:

Sets a new value for the "config_path" variable that holds the path to the configuration file, accepting only string values.

Prototype:

  • setConfigPath(path: string)

Parameters:

path -> new value for the configuration file path.

Return value:

There is no return.

Example:

TO DO


getBinaryPath

Description:

Returns the value that is stored in the variable "bin_path", this value is the path to the binary file, if this variable has not been defined, its default value is the system user path.

Prototype:

  • getBinaryPath()

Parameters:

This function has no parameter.

Return value:

String value with the bin_path.

Example:

TO DO


getConfigPath

Description:

Returns the value that is stored in the variable "config_path", this value is the path to the configuration file, if this variable has not been defined, its default value is the system user path.

Prototype:

  • getConfigPath()

Parameters:

This function has no parameter.

Return value:

String value with the config_path.

Example:

TO DO


download_url

Internal use only

Function responsible for downloading the binary or config. When necessary.


verify_bin

Internal use only

Checks the existence of the binary and the config. It also controls the download of files.


run_platform

Internal use only

Check the operating system that pyUDLF is running, windows or linux. Different execution commands.


verify_running

Internal use only

Check execution. Displaying runtime errors.


runWithConfig

Description:

Executes the udlf binary with an existing configuration file, so the file must exist and its complete path is one of the parameters of this function.

Prototype:

  • runWithConfig(config_file: string, get_output: boolean)

Parameters:

config_file: config path to be used when running udlf.

get_output: If true it executes and returns the values of the execution, if false it just executes.

Return value:

Returns an object of an output class.

Example:

TO DO


run

Description:

pyUDLF allows you to run the udlf binary without the need for a configuration file, through an object of class inputType passed as parameter. In essence, pyUDLF creates a configuration file with the data saved in the object of this class and runs the binary with this configuration file.

Prototype:

  • run(input: inputType, get_output: bool)

Parameters:

input: object of an inputType class.

get_output: If true it executes and returns the values of the execution, if false it just executes.

Return value:

Returns an object of an output class.

Example:

TO DO


Clone this wiki locally