PSCF v1.3
pscfpp.command.Command Class Reference

A single command, with a label and zero or more parameters. More...

Inheritance diagram for pscfpp.command.Command:
pscfpp.text.Record

Public Member Functions

 __init__ (self, line)
 Constructor.
 nParam (self)
 Number of parameter / arguments of the command.
 param (self, i=0)
 Return parameter number i.
 setParam (self, value, i=0)
 Set the value of a specific command parameter.
Public Member Functions inherited from pscfpp.text.Record
 __init__ (self, line)
 Constructor.
 __str__ (self)
 String representation - line from which Record was constructed.

Detailed Description

A single command, with a label and zero or more parameters.

The first string (or field) in a command is the label, and subsequent space separated strings are interpreted as command parameters. All fields are stored verbatim as strings.

Definition at line 153 of file command.py.

Constructor & Destructor Documentation

◆ __init__()

pscfpp.command.Command.__init__ ( self,
line )

Constructor.

Parameters
linestring containing the command line

Definition at line 160 of file command.py.

References fields, and label.

Member Function Documentation

◆ nParam()

pscfpp.command.Command.nParam ( self)

Number of parameter / arguments of the command.

Definition at line 167 of file command.py.

References fields.

◆ param()

pscfpp.command.Command.param ( self,
i = 0 )

Return parameter number i.

Parameters
iindex of command parameter / argument

Definition at line 175 of file command.py.

References fields.

◆ setParam()

pscfpp.command.Command.setParam ( self,
value,
i = 0 )

Set the value of a specific command parameter.

Parameters
valuenew value for the specified command parameter
iindex of command parameter (0 by default)

Definition at line 184 of file command.py.

References fields.


The documentation for this class was generated from the following file: