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

Writing gEDA schematic/symbol files. More...

Functions

def file_format_header
 Return the gEDA file header string. More...
 
def write_file
 Write a symbol or schematic to a file in libgeda format. More...
 
def format_line
 Format a line style to a string. More...
 
def format_fill
 Format a fill style to a string. More...
 
def bus_ripper_direction
 Return the libgeda ripper direction of a bus object. More...
 
def write_object
 Write an object to a file in libgeda format. More...
 

Variables

int RELEASE_VERSION = 20121203
 Current gEDA PACKAGE_DATE_VERSION. More...
 
int FILEFORMAT_VERSION = 2
 Current schematic/symbol file format version. More...
 

Detailed Description

Writing gEDA schematic/symbol files.

Function Documentation

def xorn.geda.plainwrite.bus_ripper_direction (   bus_ob)

Return the libgeda ripper direction of a bus object.

Search the schematic for ripper components connecting to the bus. If rippers are found and are oriented in the same direction, return -1 or 1 depending on the orientation, otherwise return 0.

Definition at line 85 of file plainwrite.py.

def xorn.geda.plainwrite.file_format_header ( )

Return the gEDA file header string.

This function simply returns the DATE_VERSION and FILEFORMAT_VERSION formatted as a gEDA file header.

Definition at line 43 of file plainwrite.py.

def xorn.geda.plainwrite.format_fill (   data)

Format a fill style to a string.

Definition at line 71 of file plainwrite.py.

def xorn.geda.plainwrite.format_line (   data)

Format a line style to a string.

Definition at line 62 of file plainwrite.py.

def xorn.geda.plainwrite.write_file (   f,
  rev 
)

Write a symbol or schematic to a file in libgeda format.

Parameters
[in]fA file-like object to which to write
[in]revThe symbol or schematic which should be written
Returns
None
Exceptions
ValueErrorif an object with an unknown type is encountered

Definition at line 55 of file plainwrite.py.

def xorn.geda.plainwrite.write_object (   f,
  ob,
  offset_x,
  offset_y 
)

Write an object to a file in libgeda format.

It follows the post-20000704 release file format that handles the line type and fill options.

Parameters
[in]fA file-like object to which to write.
[in]obThe object which should be written.
[in]offset_x,offset_yCoordinate offset for embedded symbols.
Returns
None.
Exceptions
ValueErrorif an object with an unknown type is encountered

Definition at line 150 of file plainwrite.py.

Variable Documentation

int xorn.geda.plainwrite.FILEFORMAT_VERSION = 2

Current schematic/symbol file format version.

Definition at line 36 of file plainwrite.py.

int xorn.geda.plainwrite.RELEASE_VERSION = 20121203

Current gEDA PACKAGE_DATE_VERSION.

Definition at line 32 of file plainwrite.py.