module loghelper.process_script
¶
Short summary¶
module pyquickhelper.loghelper.process_script
Implements function run_cmd()
.
Functions¶
function |
truncated documentation |
---|---|
Every key of dictionary |
|
Executes a python script in a separate process. |
|
Executes a script and returns the local variables. |
Documentation¶
Implements function run_cmd
.
- pyquickhelper.loghelper.process_script.dictionary_as_class(dico)[source]¶
Every key of dictionary
dico
becomes a member of a dummy class.- Parameters:
dico – dictionary
- Returns:
class
- pyquickhelper.loghelper.process_script.execute_script(code, folder=None, filename='_temp_custom_run_script_.py', check=True)[source]¶
Executes a python script in a separate process.
- Parameters:
code – python script
folder – write the script in a folder then runs it, it None, the function uses a Pool to execute the script
filename – name of the scrit to write
check – checks that the output is not empty
- Returns:
dictionary with local variables
- pyquickhelper.loghelper.process_script.execute_script_get_local_variables(script, folder=None, filename='_temp_custom_run_script_.py', check=True)[source]¶
Executes a script and returns the local variables.
- Parameters:
script – filename or code
folder – write the script in a folder then runs it, it None, the function uses a Pool to execute the script
filename – name of the scrit to write
check – checks that the output is not empty
- Returns:
dictionary