|
27 | 27 | from geophires_x.Parameter import Parameter
|
28 | 28 | from geophires_x.Parameter import ParameterEntry
|
29 | 29 | from geophires_x.Parameter import ReadParameter
|
| 30 | +from geophires_x.Parameter import boolParameter |
30 | 31 | from geophires_x.Parameter import floatParameter
|
31 | 32 | from geophires_x.Parameter import intParameter
|
32 | 33 | from geophires_x.Parameter import strParameter
|
@@ -353,6 +354,15 @@ def parameter_dict_entry(param: Parameter) -> Parameter:
|
353 | 354 | )
|
354 | 355 | )
|
355 | 356 |
|
| 357 | + self.print_output_to_console = parameter_dict_entry( |
| 358 | + boolParameter( |
| 359 | + 'Print Output to Console', |
| 360 | + DefaultValue=True, |
| 361 | + UnitType=Units.NONE, |
| 362 | + ToolTipText='Provide False if you do not want to print output to the console', |
| 363 | + ) |
| 364 | + ) |
| 365 | + |
356 | 366 | # Output parameters
|
357 | 367 | self.reservoir_volume = self.OutputParameterDict[self.reservoir_volume.Name] = OutputParameter(
|
358 | 368 | Name='Reservoir Volume (reservoir)',
|
@@ -925,7 +935,7 @@ def render_scientific(p: Parameter) -> str:
|
925 | 935 | if self.html_output_file.Provided:
|
926 | 936 | # write the outputs to the output file as HTML and the screen as a table
|
927 | 937 | self.PrintOutputsHTML(case_data_inputs, case_data_results, self.html_output_file.value)
|
928 |
| - else: |
| 938 | + elif self.print_output_to_console.value: |
929 | 939 | # copy the output file to the screen
|
930 | 940 | with open(outputfile, encoding='UTF-8') as f:
|
931 | 941 | content = f.readlines() # store all output in one long list
|
|
0 commit comments