Job settings class (runsh)¶
-
class
arepy.files.
runsh
(fileName=None, show=False, notes=False)¶ Job settings class
This class reads, modifies and saves files with arepy job settings
- Parameters
fileName (str) – Name of a file with job settings that should be opened
show (bool) – Print out an opened job settings file
notes (bool) – Read also comments after the parameters
- Variables
params – List of parameters
groups – List of parameter groups
-
parse
(rmGroups=[], rmParams=[], cmGroups=[], cmParams=[])¶ Parse the job settings as a string
- Parameters
rmGroups (list[str]) – List of parameter groups that should be removed
rmParams (list[str]) – List of parameters that should be removed
cmGroups (list[str]) – List of parameter groups that should be commented
cmParams (list[str]) – List of parameters that should be commented
- Return str
A parsed list of settings
-
write
(fileName, rmGroups=[], rmParams=[], cmGroups=[], cmParams=[])¶ Save job settings into a file
- Parameters
fileName (str) – Name of a new file with job settings
rmGroups (list[str]) – List of parameter groups that should be removed
rmParams (list[str]) – List of parameters that should be removed
cmGroups (list[str]) – List of parameter groups that should be commented
cmParams (list[str]) – List of parameters that should be commented
-
setValue
(param, value=None, note=None)¶ Set a parameter value
- Parameters
param (str) – Parameter name
value – New value of a parameter
note (str) – Comment to include after the parameter
-
getValue
(param)¶ Get a parameter value
- Parameters
param (str) – Parameter name
- Returns
Parameter value