Bases: object
Creates an input line of this keyword from the specified text. The white space between the items is automatically adjusted to fit the line size. The keyword and the total length of the line is checked not to exceed their respective maximum size.
Parameters: |
|
---|
Finds all the lines starting with this keyword.
Parameters: | lines (list) – all the lines in the input file |
---|---|
Returns: | List of all the lines |
Return type: | list |
Find the first line starting with this keyword. If no occurrence is not found and the keyword is required, the exception KeywordNotFound is raised. If the keyword is not required, the method returns None.
Parameters: | lines (list) – all the lines in the input file |
---|---|
Returns: | line |
Return type: | str |
Validate the values. Check if the values != None and if the number of values equal the specified number of parameters. Raise ValueError if these two conditions are not met.
Returns the keyword of the specified line.
Parameters: | line (str) – a line from the input file |
---|---|
Return type: | str |
Extracts the keyword, the values and the comment of an input line. The values are returned as a list.
Parameters: | line – input line |
---|---|
Returns: | keyword, values, comment |
Returns the values inside the specified line.
Parameters: | line (str) – a line from the input file |
---|---|
Return type: | list |
Extract the values from occurrence spanning more than one line. The function searches for the first expectedKeyword of list of expected_keywords and finds every occurrence. Each occurrence is then processed to identify the other expected_keywords.
It returns a list containing every occurrence and their respective values stored in a tuple.
Parameters: |
|
---|---|
Return type: | list |