montepy.input_parser.mcnp_input.Message#

class montepy.input_parser.mcnp_input.Message(input_lines, lines)#

Bases: ParsingNode

Object to represent an MCNP message.

These are blocks at the beginning of an input that are printed in the output.

Parameters:
  • input_lines (list) – the lines read straight from the input file.

  • lines (list) – the strings of each line in the message block

Methods:

format_for_mcnp_input(mcnp_version)

Creates a string representation of this input that can be written to file.

Attributes:

input_lines

The lines of the input read straight from the input file

input_text

lines

The lines of input for the message block.

format_for_mcnp_input(mcnp_version)#

Creates a string representation of this input that can be written to file.

Parameters:

mcnp_version (tuple) – The tuple for the MCNP version that must be exported to.

Returns:

a list of strings for the lines that this input will occupy.

Return type:

list

property input_lines#

The lines of the input read straight from the input file

Return type:

list

property input_text#
property lines#

The lines of input for the message block.

Each entry is a string of that line in the message block

Return type:

list