ade.specs.SpecsLoader(object)
class documentation
Part of ade.specs
(View In Hierarchy)
I load and parse a text file that defines the specifications of an
individual, including but not limited to parameter ranges. Call my instance
to get a fully populated instance of Specs
.
Construct me with an instance of Setups
and call my
instance to obtain a Specs
object with the specifications as its attributes.
Comments (lines beginning with '#', and trailing parts of a line after a '#') and blank lines are ignored.
Method | __init__ | Undocumented |
Method | parseName | I call this when I encounter a line defining a new entry, with the first and possibly only token being the entry's sub-dict key ("subkey"). |
Method | parseValue | I call this when I encounter a line defining just one or more space-delimited value, once per value. |
Method | read | Reads and parses specs from the supplied open file handle fh,
populating the supplied Specs object s. |
Method | __call__ | Loads and parses specs from the specified filePath, constructing,
populating, and returning a Specs object. |
I call this when I encounter a line defining a new entry, with the first and possibly only token being the entry's sub-dict key ("subkey").
Returns the parts of the name, or the name and None
if the
entry is not for a subdict and thus no subkey is defined.
I call this when I encounter a line defining just one or more space-delimited value, once per value.
Reads and parses specs from the supplied open file handle fh,
populating the supplied Specs
object s.
Modifies s in place. Returns the number of lines read.
Loads and parses specs from the specified filePath, constructing,
populating, and returning a Specs
object.