Handling netlist backends. More...
Functions | |
def | list_backends |
Get a sorted list of available backends. More... | |
def | load |
Load a specific netlister backend. More... | |
Variables | |
string | BACKEND_PREFIX = 'gnet_' |
Module name prefix for netlister backends. More... | |
list | load_path = [] |
Backend load path. More... | |
Handling netlist backends.
After the netlist has been constructed, it is passed to a backend which creates some kind of output based on the information in the netlist. The backend is selected by the user via the command-line option -g BACKEND
; a list of available options can be displayed using the command-line option --list-backends
.
A backend is a Python file in the special backend load path whose name starts with the prefix "gnet_"
. It should contain a special function run(f, netlist)
as the main entry point.
def xorn.geda.netlist.backend.list_backends | ( | ) |
Get a sorted list of available backends.
Returns a list of available netlister backends by searching for files in each of the directories given in load_path. A module is considered to be a netlister backend if its name begins with BACKEND_PREFIX ("gnet_").
Definition at line 56 of file backend.py.
def xorn.geda.netlist.backend.load | ( | backend_name | ) |
Load a specific netlister backend.
Searches in the backend load path for a module called gnet_backend_name
, loads it, and returns the module object.
The backend module's path is added to the system load path.
ImportError | if the module could not be loaded |
Definition at line 89 of file backend.py.
string xorn.geda.netlist.backend.BACKEND_PREFIX = 'gnet_' |
Module name prefix for netlister backends.
Only Python modules whose name starts with this prefix are considered netlister backends.
Definition at line 41 of file backend.py.
list xorn.geda.netlist.backend.load_path = [] |
Backend load path.
A list of directory names in which to search for netlister backends.
Definition at line 47 of file backend.py.