Xorn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Functions
xorn.geda.read Namespace Reference

Reading schematic/symbol files. More...

Classes

class  DefaultLog
 Default behavior for handling file read errors and warnings. More...
 
class  ParseError
 Raised when parsing a malformed file. More...
 

Functions

def read
 Read a symbol or schematic file. More...
 
def read_file
 Read a symbol or schematic file from a file object. More...
 

Detailed Description

Reading schematic/symbol files.

Function Documentation

def xorn.geda.read.read (   path,
  format = None,
  kwds 
)

Read a symbol or schematic file.

See read_file for a description of the keyword arguments.

Returns
a transient xorn.proxy.RevisionProxy instance containing the file's contents
Exceptions
ParseErrorif the file is not a valid schematic/symbol file
xorn.geda.fileformat.UnknownFormatErrorif format is not specified and the format can't be guessed from path

Definition at line 71 of file read.py.

def xorn.geda.read.read_file (   f,
  name,
  format,
  log = None,
  load_symbols = False,
  load_pixmaps = False,
  pixmap_basepath = None,
  kwds 
)

Read a symbol or schematic file from a file object.

Parameters
[in]fA file-like object from which to read
[in]nameThe file name displayed in warning and error messages
[in]formatThe file format to be expected
[in]logAn object to which errors are logged. If this is None (the default), a new DefaultLog instance is used which raises a ParseError exception on error and writes messages to sys.stderr
[in]load_symbolsWhether to load referenced symbol files as well
[in]load_pixmapsWhether to load referenced pixmap files as well
[in]pixmap_basepathBase directory for relative pixmap paths
Returns
a transient xorn.proxy.RevisionProxy instance containing the file's contents
Exceptions
ParseErrorif the file is not a valid schematic/symbol file

Definition at line 105 of file read.py.