Provides functions to generate circuit information from a circuit-file (text-file) to be passed on to MotionDetectorModel.Parser.creator.create_circ_lists.
More...
Provides functions to generate circuit information from a circuit-file (text-file) to be passed on to MotionDetectorModel.Parser.creator.create_circ_lists.
- Author
- Ilyas Kuhlemann ilyas.nosp@m.p.ku.nosp@m.@gmai.nosp@m.l.co.nosp@m.m
- Date
- 19.01.15
def CompoundPye.src.Parser.circuit_parser.parse_component_line |
( |
|
d, |
|
|
|
line |
|
) |
| |
Parse a single line of a 'components'-section (one line = information of one component) to a dictionary; add this dictionary to given d.
- Parameters
-
d | Dictionary holding one dictionary (with information of a component) per component in the whole 'components'-section. |
line | Single line to be parsed. |
def CompoundPye.src.Parser.circuit_parser.parse_component_section |
( |
|
content | ) |
|
Parse a 'components'-section to a dictionary.
- Parameters
-
content | String of the 'components'-section. |
- Returns
- Dictionary holding one dictionary (with information of a component) per component in the section.
def CompoundPye.src.Parser.circuit_parser.parse_connection_section |
( |
|
content | ) |
|
Parse the string of a single 'connections'-section.
- Parameters
-
content | String of the 'connections'-section. |
- Returns
- List of connection tuples.
def CompoundPye.src.Parser.circuit_parser.parse_file |
( |
|
fname | ) |
|
Parse circuit-data from file to several lists and dictionaries.
def CompoundPye.src.Parser.circuit_parser.parse_header |
( |
|
h | ) |
|
Parse the header of the file, read some settings and variables from it.
- Parameters
-
- Returns
- A list of settings and a dictionary with variables defined in the header.
def CompoundPye.src.Parser.circuit_parser.parse_sections |
( |
|
arrangement, |
|
|
|
sections |
|
) |
| |
Parse the strings of different sections ('components'-sections,'connections'-sections and a 'receiver'-section) to dictionaries and lists.
def CompoundPye.src.Parser.circuit_parser.save_file |
( |
|
fname, |
|
|
|
arrangement, |
|
|
|
variables, |
|
|
|
neurons, |
|
|
|
connections, |
|
|
|
receiver |
|
) |
| |
Save circuit-data from the GUI's circuit-editor to file.
def CompoundPye.src.Parser.circuit_parser.separate_sections |
( |
|
s | ) |
|
Separate the given string (read from a circuit-file) into its header and different sections.