HappyDoc Generated Documentation Class: CodeSelection

. / chimera / selection / CodeSelection 

CodeSelection class

CodeSelection(code_string, name, descriptin) => CodeSelection instance

Encapsulate Python code into a selection. The code has access to several local variables:

models
: reference to chimera.openModels. vFunc -- the function to apply to vertices. eFunc -- the function to apply to edges. funcs -- a dictionary of all of the [gsve]func's. selApply -- a function that applies the right [ve]func to the given object.

Note: if the code-string is not legal Python code, then the constructor will raise a SyntaxError exception.

Base Classes   

CodeSelection
  Selection

Methods   
  apply 
apply (
        self,
        vFunc=None,
        eFunc=None,
        )

Apply given functions to selected objects

selection.apply(vFunc=lambda...) => None

It is incumbant on the code to follow guarantees that the the vertex function is called before the edge function.

Note: many types of exceptions can happen when the code is executed.

  __str__ 
__str__ ( self )

String representation is code string

  barrenGraphs 
barrenGraphs ( self,  asDict=False )
  __init__ 
__init__ ( self,  codestr )

This document was automatically generated Thu Feb 02 15:18:23 2006 by HappyDoc version 3.0.a1