pymcnp.inp.files Subpackage

AST Classes

File Class

class pymcnp.inp.files.File(unit: str | int | Integer, filename: str | int | String, access: str | String = None, form: str | String = None, length: str | int | Integer = None)

Represents INP file elements.

classmethod from_mcnp(source: str)

Generates Entry from INP.

Parameters:

sourceEntry for INP.

Returns:

Entry.

Raises:

InpError – SYNTAX_OPTION.

to_mcnp()

Generates INP from Entry.

Returns:

INP for Entry.

property access: String

Access of file to create

Raises:
  • InpError – SEMANTICS_OPTION.

  • TypeError

property filename: String

Name of file to create

Raises:
  • InpError – SEMANTICS_OPTION.

  • TypeError

property form: String

Format of file to create

Raises:
  • InpError – SEMANTICS_OPTION.

  • TypeError

property length: Integer

Record length of file to create

Raises:
  • InpError – SEMANTICS_OPTION.

  • TypeError

property unit: Integer

Unit number of file to create

Raises:
  • InpError – SEMANTICS_OPTION.

  • TypeError