| |
- Empty
- ExtraStuff
-
- Layer(ExtraStuff, genCommands.LayerCmds)
- Genesis
-
- Checklist
- Form
- Job(Genesis, ExtraStuff, genCommands.JobCmds)
- Matrix(Genesis, genCommands.MatrixCmds)
- Step(Genesis, ExtraStuff, genCommands.StepCmds)
- Top
- MatrixCellInfo
class Checklist(Genesis) |
|
This class defines a checklist instance. Each checklist is automatically
instantiated as a member of the {step}.checks dictionary when
the {step}.checks attribute is accessed. |
|
Methods defined here:
- __init__(self, step, name)
- close(self)
- Close the checklist
- hide(self)
- hides checklist. It stays open, but isn't visible
- open(self)
- Opens checklist, but doesn't show it
- run(self, params='')
- Runs a checklist on all actions.
params - optional string (defaults to empty) <NOT IMPLEMENTED YET>
- show(self)
- Show the checklist
- update(self, action=1, params={})
- Update checklist parameters, and specify action to which updates apply
params - a dictionary of parameters. Key is parameter name and value is
parameter values assigned to parameter
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
|
class Empty |
|
This class defines a generic class constructor.
it is used to create "empty" objects, to which attributes may be assigned. |
|
Methods defined here:
- __init__(self)
|
class ExtraStuff |
|
Class definition designed to provide some additional functionality
to Job, Step, and Layer objects. And, just to make it confusing
by implementing multiple-inheritence ;)
method to retrieve Genesis attributes listed as the given name
Returns None if the Genesis object does not have the attribute |
|
Methods defined here:
- getGenesisAttr(self, name)
- Retrieve string associated with a certain attribute
|
class Form(Genesis) |
|
Defines a form instance. It is automatically instantiated as a member
of the job.forms dictionary when the job.forms attribute is accessed. |
|
Methods defined here:
- __init__(self, job, name)
- close(self)
- Closes the form
- color(self, element, color)
- change an element to another color
element: Element Name
color: six digit color code (RRGGBB)
- delete(self)
- Deletes this form
- open(self)
- Opens and shows the form
- read(self, field)
- Reads a form element, with opt_name set to no (i.e. gives selected column for options, not option name)
field - string containing name of form element to read
- readOpt(self, field)
- Reads a form element with opt_name set to yes (i.e. gives option value, not which column)
field - string containing name of form element to read
- visibility(self, field, mode)
- Changes an elements visibility
field - element name
mode - mode (sensitve,unsensitive,hide,unhide)
- write(self, field, value, color='')
- write value into field
field - string with name of form element
value - value to put there (for radio,etc, put col # )
color (optional) - six digit color code
- writeFile(self, fileName, color='')
- write sets of values into elements. Read information from file. Doesn't use option names
file - file containing element/value pairs see Genesis Docs for edit_form_list
color - optional - color for changed elements (I think)
- writeFileOpt(self, fileName, color='')
- write sets of values into elements. Read information from file. Uses option names
file - file containing element/value pairs see Genesis Docs for edit_form_list
color - optional - color for changed elements (I think)
- writeOpt(self, field, value, color='')
- write value into field , using option name
field - string with name of form element
value - value to put there (for radio,etc, put value, not col#)
color (optional) - siz digit color code
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
|
class Genesis |
|
This class defines the low-level interface methods for use with Genesis.
It serves as a base-class for the higher-level objects. It defines
methods to interface with Genesis itself with the methods Frontline has
provided. |
|
Methods defined here:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- __init__(self)
- Initialize method, called when object is instantiated (created)
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes defined here:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
|
class Job(Genesis, ExtraStuff, genCommands.JobCmds) |
|
This class is ised to represent a job object in the Genesis database. It is used to open, close, and manipulate
jobs. Other classes representing steps, forms, matrices, etc, can be contained by this class. |
|
- Method resolution order:
- Job
- Genesis
- ExtraStuff
- genCommands.JobCmds
Methods defined here:
- __getattr__(self, name)
- Hook to generate attributes as they're requested - it is run automatically upon
initial request of an attribute. e.g. <class instance>.attribute
If the attribute is in this method, it is handled by methods defined here,
otherwise the Genesis job object associated with this instance is inspected
for a corresponding Genesis attribute; the value of which is stored in the
instance attribute.
Special Attributes Supported: matrix, info, steps, forms, db, dbpath, lockStat, user, bucket, xmlbucket
- __init__(self, name)
- __str__(self)
- Returns string describing class - also what is printed if print method called on class object
- dbName(self)
- Returns the name of the job. Populates <inst>.db
- dbPath(self)
- Returns the file path to the job. Populates <inst>.dbpath
- dbStat(self)
- Returns the lock status. Populates <inst>.lockStat
- getBucket(self)
- Returns the persistency bucket...inspects the genPersist module to
check the value of ENGINE, which by default is set to XML if gnosis.xml is installed.
- getForms(self)
- Populates the self.forms list. This contains a list of all form names in the job. Forms aren't
very fully implemented yet.
- getInfo(self)
- Called by __get_attr__ or can be called by user. Builds and returns <inst>.info dictionary
- getSteps(self)
- Populates the <inst>.steps dictionary with Step classes representing each step. Use to update
the job class's representation of its steps
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
Methods inherited from ExtraStuff:
- getGenesisAttr(self, name)
- Retrieve string associated with a certain attribute
Methods inherited from genCommands.JobCmds:
- addStep(self, name)
- Add a step to the job.
name - name of new step
- checkin(self)
- Not implemented yet.
- checkout(self)
- Not implemented yet.
- close(self, unlock)
- Close job represented by this class.
unlock - if > 1, checks in/unlocks the job
- importForm(self, formName, newFormName='')
- Import a form into the job from genesislib.
formName - string containing name of form to import
- open(self, lock)
- Open the job, and checkout if so indicated
lock - integer: if > 1, job is checked out/locked
- removeStep(self, name)
- Remove a step from the job.
name - name of step to delete
- save(self, override='no')
- Save the job pointed to by the job class (job.name)
override (optional) defaults to no. If set to yes, then overrides online violations
- setGenesisAttr(self, name, value)
- Set job attribute to a value, update Python attribute value.
name - string containing name of attribute
value - string/int/float containing value of attribute
NOTE: Value may be cast to string upon retreival
|
class Layer(ExtraStuff, genCommands.LayerCmds) |
|
this class defines a layer object inside editor. It may contain info, but cannot
issue COM commands on it's own. This layer object is a child of a step,
NOT the matrix. e.g. this object does not represent a matrix row.
Most of these are commands you can access by right-clicking a layer in the editor. |
|
- Method resolution order:
- Layer
- ExtraStuff
- genCommands.LayerCmds
Methods defined here:
- __del__(self)
- __getattr__(self, name)
- Hook to generate attributes as they're requested - it is run automatically upon
initial request of an attribute. e.g. <class instance>.attribute
If the attribute is in this method, it is handled by methods defined here,
otherwise the Genesis layer object associated with this instance is inspected
for a corresponding Genesis attribute; the value of which is stored in the
instance attribute.
Special Attributes Supported: info, cell, color, hexcolor
- __init__(self, step, name)
- getColor(self, format='rgb')
- Return the color used in the Genesis matrix for this layer.
If format is 'rgb', a tuple of rgb values is returned (e,g, (252,198,55) for signal layers).
If format is 'hex', a string representing the hexadecimal color value is returned (e.g. 'FCC64D')
This method is called when the layer's self.color or self.hexcolor attribute are accessed
The colors table is a dictionary defined in the Genesis class as self.colors
- getInfo(self)
- Get all info about self, store in self.info
This method is automagically called when one accesses the self.info attribute.
Methods inherited from ExtraStuff:
- getGenesisAttr(self, name)
- Retrieve string associated with a certain attribute
Methods inherited from genCommands.LayerCmds:
- affect(self)
- Sets this layer to be affected
- copy(self, dest_lay, mode='replace')
- copies this layer to destination layer
dest_lay - name of destination layer
mode - replace or append defaults to replace
- display(self, num=1)
- Display layer in the editor
num - color number (defaults to 1)
- featOut(self, fileName='')
- Takes all the features on the layer, parses them, and returns them in a
dictionary. See Features.py module.
fileName (optional) - name with path of filename if you don't want to use the
default temp files
- featSelOut(self, fileName='')
- Takes all the Selected features, parses them, and returns them in a
dictionary. See Features.py module.
filename - see featOut()
- histogram(self)
- Returns a dictionary of histogram information on the layer. Returns key value pairs of
all the histogram information.
- polarity(self)
- Returns the polarity of the layer
- setGenesisAttr(self, name, value)
- Set layer attribute to a value, update Python attribute value.
name - string containing name of attribute
value - string/int/float containing value of attribute
NOTE: Value may be cast to string upon retreival
- unaffect(self)
- Unaffects the layer
- work(self)
- Changes this to the work layer
|
class Matrix(Genesis, genCommands.MatrixCmds) |
|
Defines the job matrix. Allows manipulation of matrix and retrieval of information from matrix
accessed as <jobname>.matrix |
|
- Method resolution order:
- Matrix
- Genesis
- genCommands.MatrixCmds
Methods defined here:
- __getattr__(self, name)
- Method to dynamically get info about the matrix
Attributes Supported: info
- __init__(self, job)
- getInfo(self)
- Called when the info dictionary is accessed if not already created. Populates info
dictionary.
- getRow(self, name)
- method returns row number of given layer. A row number of zero
means the layer doesn't exist
name - string containing name of layer
- getRowColor(self, rowNum, format='rgb')
- Return the color used in the Genesis matrix for the given row (layer).
If format is 'rgb', a tuple of rgb values is returned (e,g, (252,198,55) for signal layers).
If format is 'hex', a string representing the hexadecimal color value is returned (e.g. 'FCC64D')
The colors table is a dictionary defined in the Genesis class as self.colors
- getRowInfo(self, rowNum)
- Method returns dictionary of information on given row. Dictionary contains
following keys: name, context, type, polarity, and side
rowNum - The row number in the matrix
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
Methods inherited from genCommands.MatrixCmds:
- addLayer(self, name, index, context='board', type='signal', polarity='positive')
- Add a row /layer to the matrix
name - name of layer
index - row number to use
context - context of layer (default to board)
type - type of layer (default to signal)
polarity - polarity of layer (default to positive)
- copyRow(self, name, newName, context='misc', newRow=3, overwrite=0)
- Copy a row from one location to another in the matrix. If newRow not indicated, copies
to the end of the matrix.
name - name of row
newName - name of new row
context - context of new row (default to misc)
newRow - number of new row if you need it to be in a certain place
overwrite - overwrite row by same name as newName with this copy (defaults to 0)
- deleteRow(self, name)
- Delete a row from the matrix
name - name of row
- modifyRow(self, currentName, row=0, name='', context='', type='', polarity='')
- Change the attributes of a row. You only need assign values for the things you want
to change. Be sure to use the key value pair in the parameters list.
currentName - name of current row to modify.
(optional below)
row - new row (defaults to leaving it in same place (indicated by 0)
name - new name
context - new context
type - new type
polarity - new polarity
- removeLayer(self, lay)
- Remove a layer from the matrix
lay - name of layer
- returnRows(self, context='', type='', polarity='', side='', names=1)
- Return all the rows matching certain criteria. Defaults to returning names
can use '|' to separate multiple specs for each type (or)
context (optional) - return with certain context
type (optional) - return with certain type
polarity (optional) - return with certain polarity
side (optional) - return with certain side (top or bottom)
names (optional) - defaults to 1, meaning names are returned. 0
means row numbers are returned
|
class MatrixCellInfo |
|
This class defines an object which describes a layer's
matrix information. This object may only be a child of a layer
object. Object in layer class is self.cell |
|
Methods defined here:
- __init__(self, parent)
- parse(self)
- Run by __init__ method - parses matrix info into the object
|
class Step(Genesis, ExtraStuff, genCommands.StepCmds) |
|
This class defines a step instance. It is automatically instantiated as a
member of the job.steps dictionary when the job.steps attribute is accessed.
StepCmds is a subclass that is set up in genCommands.py containing commands for Steps.
The step class allows for operations at the step level and is a gateway to the graphic
editor functions and checklists, as well as layer manipulation (not the matrix - that
is at the job level) |
|
- Method resolution order:
- Step
- Genesis
- ExtraStuff
- genCommands.StepCmds
Methods defined here:
- COM(self, args)
- Overloading method, to set group automatically - in the graphic editor
- __getattr__(self, name)
- Hook to generate attributes as they're requested - it is run automatically upon
initial request of an attribute. e.g. <class instance>.attribute
If the attribute is in this method, it is handled by methods defined here,
otherwise the Genesis job object associated with this instance is inspected
for a corresponding Genesis attribute; the value of which is stored in the
instance attribute.
Special Attributes Supported: info, profile, layers, sr, datum, checks
- __init__(self, job, name)
- getChecks(self)
- Builds a dictionary of all the checklists in the step. It points to checklist
classes, as defined in this module
- getDatum(self)
- Creates datum dictionary. <inst>.datum['x'] or ['y']
- getInfo(self)
- Build the self.info dictionary... Doesn't do a full command (excluding -d from info command)
because it does LIMITS, which takes forever! Returns <inst>.info
- getLayers(self)
- Builds a dictionary of all the layers in the step. This dictionary
points to Layer classes as defined in this module.
- getProfile(self)
- Retrieves profile limits and places in <inst>.profile class. Access
values by <stepinst>.profile.xmin (xmax, ymin, ymax, xsize, ysize, xcenter, ycenter)
- getSr(self)
- Builds <inst>.sr object and returns it. This is the step & repeat limits.
The numbers it generates are accessed in dot notation as well (like profile)
(srLimits:L xmin, xmax, ymin, ymax, eBorder, wBorder, nBorder, sBorder, table)
(Table contains list entries, each with access to each instance using dot
notation - step, xanchor, yanchor, xdist, ydist, xnum, ynum, angle, mirror,
xmin, xmax, ymin, ymax. Accessed as sr.table[x].xmax, etc.
- isLayer(self, layer_name='misc')
- Method to check for a single layer. Sometimes faster than doing a key search on the
layers dictionary Returns 1 if exists, 0 if not.
layer_name = String representing the name of the layer
- setGroup(self)
- Sets AUX group to current editor
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
Methods inherited from ExtraStuff:
- getGenesisAttr(self, name)
- Retrieve string associated with a certain attribute
Methods inherited from genCommands.StepCmds:
- addArc(self, xs, ys, xe, ye, xc, yc, symbol, direction, polarity='positive', attributes='no')
- Add an arc to the selected layers in this step. xs/ys - start, xe/ye - end, xc/yc, center
direction is 'CW' or 'CCW'. All are mandatory except polarity, which defaults to pos, and
attributes, defaulting to no. NOTE: This is precise only to sixth decimal
- addAttr(self, attr, attrVal='', valType='int')
- Add attribute to attribute list
valType determines what attrVal should be
valType : default is 'int', also 'float', 'text', 'option'
- addLine(self, xs, ys, xe, ye, symbol, polarity='positive', attributes='no')
- Add a line to the selected layers in this step. The arguments are self explanatory.
All are mandatory except polarity, which defaults to pos, and attributes, defaulting to no.
NOTE: This is precise only to sixth decimal
- addPad(self, x, y, symbol, polarity='positive', angle=0, mirror='no', nx=1, ny=1, dx=0, dy=0, xscale=1, yscale=1, attributes='no')
- Add a pad to the selected layers in this step. The arguments are self explanatory.
All are optional except x, y, and symbol. NOTE: This is precise only to sixth decimal
Also remember that dx and dy are in mils(microns)
- addRectangle(self, xs, ys, xe, ye, polarity='positive', attributes='no')
- Add a rectangle to the selected layers in this step. Need opposing
corners for this to work. polarity defaults to positive, attributes to no.
NOTE: This is precise only to sixth decimal
- addRoutChain(self, layer, size, compensation, feed, flag=0, speed=0, first=0, change_direction=-1)
- Add selected features to a new rout chain. This try rout chain 1, and if it fails,
to try adding the chain, incrementing the chain number, until success. It only goes to 100.
Chain Number is returned. If -1 returned, there was an error
layer - layer to add rout chain to
size (float) - size in inches for rout bit can be specified to 10th of mils only.
compensation (str) - right, left, none
feed (int) - feed rate
flag (int) - default 0 - flag number
speed (int) - default 0 - speed number
first (int) - default 0 : -1 is not specified. >0 is the first feature in chain. 0 is first of
selected features to be added to layer (by index number), on up)
change_direction (int) - defaults to -1 - not sure what it is for.
- addText(self, x, y, text, xSize, ySize, width, mirror='no', angle=0, polarity='positive', attributes='no')
- Add text to the selected layers in this step. x/y - text bottomleft corner (bottomright if mirror,
xSize, ySize is size in mil of text, width is line width in mil, mirror defaults to no, angle defaults to 0
but can be 0,90,180,270 -polarity defaults to positive, attributes defaults to no.
NOTE: This is precise only to sixth decimal
- affect(self, lay)
- affect a layer in the graphic editor
lay - name of layer
- affectFilter(self, filter)
- Affect by filter in Graphic Editor
filter - string containing filter configuration
- buffCopy(self)
- Copy selected features to buffer
- buffPaste(self, x=0, y=0)
- Paste from buffer to x and y location indicated (defaults to origin)
- clearAll(self)
- Clears all the layers from editor window (turns everything off)
this means it clears and unaffects all layers, selections, and highlights
- clearAndReset(self)
- Clears any selections in the graphic editor and resets the filter
- clearSel(self)
- Clears selections from graphic editor
- close(self)
- Close the editor window
- copyLayer(self, job, step, lay, dest_lay, mode='replace', invert='no')
- Copy a layer from another location to current step
job - name of source job
step - name of source step
lay - name of source layer
dest_lay - name of destination layer (to be created)
mode (defaults to 'replace') - 'replace' to replace, 'append' to add to end of layer list
invert (defaults to 'no') - invert the layer
- copySel(self, layerName, invert='no')
- Copies selected features to a new layer
layerName - name of layer to copy to
invert - 'yes' or 'no' default to 'no' - invert polarity of features
being copied.
- copyToAffected(self, invert='no', dx=0, dy=0, size=0)
- Copy selected features to affected layers.
invert (default to 'no') - 'yes' or 'no' indicates if features' polarity inverted
dx,dy - x and y shift for copied features
size - resize features by this amount when copied
- copyToLayer(self, lay, invert='no', dx=0, dy=0, size=0)
- Copy selected features to a specific layer. See copyToAffected() for options
- createCheck(self, checkName)
- Create a new checklist
checkName - name of new checklist
- createLayer(self, name, context='misc', laytype='document', polarity='positive')
- Create a blank layer.
name - new layer name
context - (defaults to 'misc') context of layer (board,misc)
laytype - (defaults to 'document) type of layer (document, signal, etc...)
polarity - (defaults to positive) polarity of layer (positive, negative)
- deleteCheck(self, checkName)
- Delete a checklist
checkName - name of checklist to delete
- display(self, lay, work=1)
- Displays the layer in color 1, makes it work layer by default
lay - string containing layer name
work - integer 0=don't make work layer 1=make work layer
- display_layer(self, lay, num, work=0, display='yes')
- Display layer in editor.
lay - string containing layer name
num - integer (1-4) indicating color to display
work - defaults to 0, see display()
display - 'yes' to display layer, 'no' to clear layer. default: 'yes'
- featureSelected(self)
- return number of selected features. Can be used as boolean as well
returns zero if no features selected, # features if there are
- importCheck(self, checkName, replace=0)
- get checklist from library - replace if indicated
checkName - name of checklist to replace
replace - defaults to 0, if > 0, existing checklist is replaced
- inputAuto(self, path, report_path='', report_filename='', copy_to_job='no')
- Run the input screen on a specific path. Save the report to another specific path.
path - path to look for input data
report_path - path in which to save report data
report_filename (optional) will use jobname_inp.txt if not specified
copy_to_job (optional) "yes" or "no" to tell if you want to copy input files to job input directory
- mergeLayers(self, sourceLayer, destLayer, invert='no')
- Merge the selected layers
- open(self, iconic='No')
- Open the step in graphic editor.
iconic - string "Yes" or "No" indicating whether to open step as an icon only
- refSelectFilter(self, refLay, include_syms='', exclude_syms='', mode='touch', reset=0)
- Select by reference, using filter (so you better reset the filter if you need to!)
refLay - reference layer
include_syms (optional) - symbols to include in selection
exclude_syms (optional) - symbols to exclude from selection
mode (optional) - defaults to 'touch'
reset (optional) - defaults to 0 (0 = DON'T reset filter, 1 = reset filter)
- removeLayer(self, lay)
- Remove a layer
lay - name of layer
- resetAttr(self)
- Reset the attribute List
- resetFilter(self)
- Reset the selection filter
- routCopy(self, sourceLayer, destLayer, destType='document')
- Copy a rout layer to another layer. destType determines if copied as normal features or rout features
Obliterates the layer you are copying to
destType - 'document' or 'rout'
- selectAll(self)
- Select all features on affected layers, (applying popup filter)
returns number selected
- selectDelete(self)
- Delete Selected features.
- selectNone(self)
- Unselect all features.
- selectRectangle(self, xs, ys, xe, ye, intersect='no', reset=0)
- Select all features in a rectangle
xs, ys, xe, ye - start and end x,y coordinates
intersect - if 'yes' selects symbols intersected by rectangle but not fully inside
defaults to 'no'
reset - see selectSymbol()
- selectSymbol(self, symbolName='', reset=0, clear=0)
- Select the Symbol indicated in the string resets if told to,
clears other features if told to.
symbolName - Symbol to select
reset - resets filter if you don't want this
action to be affected by pre-existing filter settings.
defaults to NOT reset (integer 0 = no reset, 1 = reset)
clear - Clear all selected features first ( 0 = don't clear, 1 = clear)
- setAttrFilter(self, attr)
- Set an attribute in the attribute filter
attr - name of attribute
- setChainPlunge(self, layer, chain, len1, len2, intType='corner', mode='wrap', inl_mode='straight', start_of_chain='yes', apply_to='all', len3=0.0, len4=0.0, val1=0, val2=0, ang1=0, ang2=0, ifeed=0, ofeed=0)
- Set up the plunge for a rout chain. Lots and lots of options. For now, you can look at
the code yourself.
- setGenesisAttr(self, name, value)
- Set step attribute to a value, update Python attribute value.
name - string containing name of attribute
value - string/int/float containing value of attribute
NOTE: Value may be cast to string upon retreival
- setSymbolFilter(self, syms)
- Set a symbol on which to filter
syms - symbol name
- unaffect(self, lay)
- un-affect a layer in the graphic editor
lay - name of layer
- zoomHome(self)
- Zoom out to profile view/home
|
class Top(Genesis) |
|
This class can be used to find out status about Genesis on the main DB level, and do top level functions
What jobs are open, etc. |
|
Methods defined here:
- __init__(self)
- __str__(self)
- Returns string describing class - also what is printed if print method called on class object
- createJob(self, name, db_name)
- Create a Genesis job by the name given. Return a job class instance by that name.
Job must be opened after this call. It will be closed and checked in initially.
name - name of new Genesis job entity
db_name - name of database in which to put it
- currentJob(self)
- If in a job, this method returns that job as a string
- currentStep(self)
- If in a step, return the step name as a string
- deleteJob(self, name)
- Delete a Genesis job by the name given. Return status of command.
returns -1 if no such job.
name - name of existing job
- getUser(self)
- Returns the name, as a string, of the current user
- importJob(self, name, import_dir, db_name)
- Import an ODB++/Valor format job - returns status.
name - name to give new job
import_dir - directory from which to import
db_name - database it will reside in
- listJobs(self)
- Returns a list of jobs in the databases., as a list of strings
- openJobs(self)
- Returns a list of open jobs, as a list of strings
Methods inherited from Genesis:
- AUX(self, args)
- Genesis AUX command - returns STATUS. Sets class variables READANS
and COMANS, returns STATUS
args - string containing arguments
- COM(self, args)
- Genesis COM command - all important command to issue script commands - returns STATUS
and sets READANS as the command response raw input. COMANS is the parsed READANS. These are
class variables
args - string containing arguments for COM command (everything after COM)
- DISP_INFO(self, args)
- This is similar to the DO_INFO but is run in 'display' mode and is parsed differently
- this method is not complete
- DO_INFO(self, args)
- This is the command COM info,... returns a dictionary with all the information in the
output file from the info command. Each array of information is accessed by a key to the
dictionary that is returned. LIMITATION: Any string resembling a number will be converted
to a number. This means that a layer with the name '1.' or '1' will be returned later as
the float 1.0
args - arguments to the info command as a string
- INFO(self, args)
- This is similar to the Genesis command COM(info,...) Returns list of strings which
are lines from the output file
args - string containing all the arguments to the info command
(that would be after the info,_*_)
- MOUSE(self, msg, mode='p')
- Genesis MOUSE command - pauses to allow user to select a location with the mouse -
returns STATUS as integer. Sets class variables READANS and MOUSEANS to mouse location
msg - message to put in dialog box
mode - set to character 'p' or 'r' p means to return a point, and r a rectangle (two points)
- PAUSE(self, msg)
- Genesis PAUSE command - pauses script with box, and allows user to interact with
Genesis before continuing - returns STATUS (as integer), sets class variables
READANS and PAUSANS
msg - string containing message to put in pause dialog box
- SU_OFF(self)
- Genesis SU_OFF command - eq to running SU_OFF in csh
- SU_ON(self)
- The Genesis SU_ON command - eq. to running SU_ON in csh
- VOF(self)
- Genesis VOF command - turns on script halting on errors - eq to running VOF in csh
- VON(self)
- Genesis VON command - turns off script halting on errors- eq to running VON in csh
- __del__(self)
- Called when class is cleaned up by python
- blank(self)
- Cleans out the return values
- clean(self, strip_me, badchars)
- Internal - strips a string (strip_me) of given (badchars) on either edge - used in parsing
- convertToNumber(self, value)
- Utility function - converts string to a number returns integer if
possible - otherwise returns a float
value - string to be converted
- dbutil(self, *args)
- Runs the dbutil command with the specified arguments - returns lines from the response as
array of strings
args - arguments for dbutil command
- error(self, msg, severity=0)
- Basic error handler
msg - string containing error message
severity - integer. If greater than one script exits
- normalize(self)
- Normalize the path to GENESIS_EDIR, and make sure the environment is set
- parseDispInfo(self, infoList)
- Parses output from info command that was run in display mode. Incomplete
- parseFeatureInfo(self, infoList)
- Internal - Parses output from the info command when it writes out features. Uses the genFeatures.py
module and parses the information from this command (-d FEATURES) into class objects.
- parseInfo(self, infoList)
- Internal - parses the output from the info command into a dictionary - returns dictionary
- printFeatureDict(self, features_dict)
- Used for debugging purposes, this prints out a dictionary created with the parseFeatureInfo command
features_dict - dictionary returned by method parseFeatureInfo
- sendCmd(self, cmd, args='')
- Send a command to STDOUT - This is where Genesis will
see a command - used by CMD, DO_INFO, etc
cmd - the command root in CSH script form
args - any arguments to the initial command CMD xxx...
- write(self, msg)
- Very basic output writer
msg - string to write to STDOUT
Data and other attributes inherited from Genesis:
- colors = {'hex': {'document': '9BDBDB', 'drill': '9BB4BF', 'mixed': 'F2E086', 'power_ground': 'DBAD00', 'rout': 'D8D8D8', 'signal': 'FCC64D', 'silk_screen': 'FFFFFF', 'solder_mask': '00A57C', 'solder_paste': 'FFFFCE'}, 'rgb': {'document': (155, 219, 219), 'drill': (155, 180, 191), 'mixed': (242, 224, 134), 'power_ground': (219, 173, 0), 'rout': (216, 216, 216), 'signal': (252, 198, 55), 'silk_screen': (255, 255, 255), 'solder_mask': (0, 165, 124), 'solder_paste': (255, 255, 206)}}
| |