PSCF v1.3.3
|
Parameter Sweeps (Prev) Field Files (Next)
An instance of class Script (or pscfpp.command.Script) can be used to parse and store the contents of a PSCF command script file. Each single-line command in such a file is stored as an instance of a class Command (or pscfpp.command.Command) that contains a list of the space separated strings that make up such a command. The first string in each command, which is the command name, is stored in the 'label' attribute of the resulting Command object.
To parse and store the contents of a command file named 'input', one could enter:
Individual Command objects within a Script object can be accessed using the square bracket subscript operator using the either an integer index or the name of the command (a string) as a key:
Values of arguments of individual Command objects be accessed or modified using the param and setParam methods of class Command. A Script may be converted to a multi-line string using the str() function.
Parameter Sweeps (Prev) Python Tools (Up) Field Files (Next)