one
This describes the easyconfig format version 1.X
This is the original pure python code, to be exec'ed rather then parsed
Authors:
- Stijn De Weirdt (Ghent University)
- Kenneth Hoste (Ghent University)
FormatOneZero
¶
Bases: EasyConfigFormatConfigObj
Support for easyconfig format 1.x
comments
property
¶
Return comments (and extract them first if needed).
__init__(*args, **kwargs)
¶
FormatOneZero constructor.
dump(ecfg, default_values, templ_const, templ_val, toolchain_hierarchy=None)
¶
Dump easyconfig in format v1.
PARAMETER | DESCRIPTION |
---|---|
ecfg |
EasyConfig instance
|
default_values |
default values for easyconfig parameters
|
templ_const |
known template constants
|
templ_val |
known template values
|
toolchain_hierarchy |
hierarchy of toolchains for easyconfig
DEFAULT:
|
extract_comments(rawtxt)
¶
Extract comments from raw content.
Discriminates between comment header, comments above a line (parameter definition), and inline comments. Inline comments on items of iterable values are also extracted.
get_config_dict()
¶
Return parsed easyconfig as a dictionary, based on specified arguments. This is easyconfig format 1.x, so there is only one easyconfig instance available.
parse(txt)
¶
Pre-process txt to extract header, docstring and pyheader, with non-indented section markers enforced.
validate()
¶
Format validation
dump_dependency(dep, toolchain, toolchain_hierarchy=None)
¶
Dump parsed dependency in tuple format
retrieve_blocks_in_spec(spec, only_blocks, silent=False)
¶
Easyconfigs can contain blocks (headed by a [Title]-line) which contain commands specific to that block. Commands in the beginning of the file above any block headers are common and shared between each block.