process_output
Handles writing output to PROCESS MFile/OUTFile.
OutputFileManager
Manages the opening of regular/idempotence output files.
Source code in process/core/process_output.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
open_files(output_prefix, *, mode='w')
classmethod
Setup the handlers for MFile and OUTFile for writing.
Source code in process/core/process_output.py
15 16 17 18 19 20 21 22 23 | |
open_idempotence_files(output_prefix)
classmethod
Setup the handlers for idempotence MFile and OUTFile for writing.
Source code in process/core/process_output.py
25 26 27 28 29 30 31 32 33 34 35 36 | |
close_idempotence_files(output_prefix)
classmethod
Removes idempotence output files, closes the handler, and opens the main output files.
Source code in process/core/process_output.py
38 39 40 41 42 43 44 45 46 47 | |
finish()
classmethod
Closes the file handlers.
Source code in process/core/process_output.py
49 50 51 52 53 | |
write(file, string)
Writes a string to the given file identifier.
Raises:
| Type | Description |
|---|---|
ProcessValueError
|
The file is not recognised as an MFile, OUTFile, or terminal. |
Source code in process/core/process_output.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
ocentr(file, string, width, *, character='*')
Write a centred header within a line of characters to a file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
string
|
str
|
the heading text |
required |
width
|
int
|
the desired with of the header |
required |
character
|
the character to pad the heading with () (Default value = "") |
'*'
|
Source code in process/core/process_output.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | |
ostars(file, width, *, character='*')
Write a line of characters to a file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
width
|
int
|
the desired with of the line |
required |
character
|
the character to fill the line with () (Default value = "") |
'*'
|
Source code in process/core/process_output.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
oheadr(file, string, *, width=110, character='*')
Write a centred header within a line of characters between two blank lines
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
string
|
str
|
the heading text |
required |
width
|
int
|
the desired with of the header |
110
|
character
|
the character to pad the heading with () (Default value = "") |
'*'
|
Source code in process/core/process_output.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
oshead(file, string, *, width=80, character='*')
Write a short centred header within a line of characters between two blank lines
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
string
|
str
|
the heading text |
required |
width
|
int
|
the desired with of the header |
80
|
character
|
the character to pad the heading with () (Default value = "") |
'*'
|
Source code in process/core/process_output.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 | |
oblnkl(file)
Write a blank line to a file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required |
Source code in process/core/process_output.py
149 150 151 152 153 154 155 156 157 | |
osubhd(file, string)
Write a subheading between two blank lines
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
string
|
the heading text |
required |
Source code in process/core/process_output.py
160 161 162 163 164 165 166 167 168 169 170 171 172 | |
ocmmnt(file, string)
Write a comment to a file
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
the integer unit of the file |
required | |
string
|
str
|
the comment text |
required |
Source code in process/core/process_output.py
175 176 177 178 179 180 181 182 183 184 185 | |
ovarre(file, descr, varnam, value, output_flag='')
Write out a variable to a file via its identifier.
Source code in process/core/process_output.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
obuild(file, descr, thick, total, variable_name='')
Write build variables to the output file via its identifier.
Source code in process/core/process_output.py
223 224 225 | |