Xorn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
xorn.geda.clib.CommandSource Class Reference

Source object representing a pair of symbol-generating commands. More...

Public Member Functions

def __init__
 
def list
 Poll the library command for symbols. More...
 
def get
 Get symbol data for a given symbol name. More...
 

Public Attributes

 list_cmd
 Command and arguments for listing available symbols. More...
 
 get_cmd
 Command and arguments for retrieving symbol data. More...
 

Detailed Description

Source object representing a pair of symbol-generating commands.

This class allows a program or pair of programs in the system search path which can generate symbols to be used as a component source.

list_cmd and get_cmd should be pre-tokenized invocations consisting of an executable name followed by any arguments required. Executables are resolved using the current PATH.

The list command will be executed with no additional arguments, and should output a list of available symbol names on the stdandard output. The get command will have a symbol name appended to it as the final argument, and should output gEDA symbol data on standard output.

If the command cannot successfully complete, it should exit with non-zero exit status. Anything it has output on stdout will be ignored, so stderr should be used for diagnostics.

Definition at line 173 of file clib.py.

Constructor & Destructor Documentation

def xorn.geda.clib.CommandSource.__init__ (   self,
  list_cmd,
  get_cmd 
)

Definition at line 174 of file clib.py.

Member Function Documentation

def xorn.geda.clib.CommandSource.get (   self,
  symbol 
)

Get symbol data for a given symbol name.

Definition at line 202 of file clib.py.

def xorn.geda.clib.CommandSource.list (   self)

Poll the library command for symbols.

Runs the library command, requesting a list of available symbols, and returns the new list.

Definition at line 185 of file clib.py.

Member Data Documentation

xorn.geda.clib.CommandSource.get_cmd

Command and arguments for retrieving symbol data.

Definition at line 178 of file clib.py.

xorn.geda.clib.CommandSource.list_cmd

Command and arguments for listing available symbols.

Definition at line 176 of file clib.py.


The documentation for this class was generated from the following file: