Package gavo :: Package rscdef :: Module scripting :: Class Script
[frames] | no frames]

Class Script

source code

                   object --+            
                            |            
 base.structure.StructureBase --+        
                                |        
                   object --+   |        
                            |   |        
           base.common.Parser --+        
                                |        
base.structure.ParseableStructure --+    
                                    |    
             base.structure.Structure --+
                                        |
                           object --+   |
                                    |   |
      base.structure.RestrictionMixin --+
                                        |
                                       Script

A script, i.e., some executable item within a resource descriptor.

The content of scripts is given by their type -- usually, they are either python scripts or SQL with special rules for breaking the script into individual statements (which are basically like python's).

The special language AC_SQL is like SQL, but execution errors are ignored. This is not what you want for most data RDs (it's intended for housekeeping scripts).

See `Scripting`_.

Nested Classes

Inherited from base.structure.StructureBase: __metaclass__

Instance Methods
 
getSource(self)
returns the content with all macros expanded.
source code

Inherited from base.structure.Structure: __provides__, callCompletedCallbacks, completeElement, finishElement, onElementComplete, validate

Inherited from base.structure.ParseableStructure: __init__, end_, feed, feedFrom, feedObject, getAttribute, iterEvents, start_, value_

Inherited from base.structure.StructureBase: __providedBy__, adopt, breakCircles, change, copy, getAttributes, getCopyableAttributes, getSourcePosition, iterChildren, setPosition

Inherited from base.common.Parser: feedEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from base.structure.StructureBase: fromStructure

Class Variables
  name_ = 'script'
a sentinel for all kinds of undefined values.
  typeDesc_ = 'Embedded executable code with a type definition'
  attrSeq = [<gavo.base.structure.DataContent object>, <gavo.bas...
  managedAttrs = {'content_': <gavo.base.structure.DataContent o...

Inherited from base.structure.Structure: __implemented__

Inherited from base.structure.StructureBase: completedCallbacks

Properties

Inherited from object: __class__

Class Variable Details

attrSeq

Value:
[<gavo.base.structure.DataContent object>,
 <gavo.base.parsecontext.IdAttribute object>,
 <gavo.base.attrdef.EnumeratedUnicodeAttribute object>,
 <gavo.base.attrdef.UnicodeAttribute object>,
 <gavo.base.attrdef.BooleanAttribute object>,
 <gavo.base.parsecontext.OriginalAttribute object>,
 <gavo.base.attrdef.EnumeratedUnicodeAttribute object>]

managedAttrs

Value:
{'content_': <gavo.base.structure.DataContent object>,
 'id': <gavo.base.parsecontext.IdAttribute object>,
 'lang': <gavo.base.attrdef.EnumeratedUnicodeAttribute object>,
 'name': <gavo.base.attrdef.UnicodeAttribute object>,
 'notify': <gavo.base.attrdef.BooleanAttribute object>,
 'original': <gavo.base.parsecontext.OriginalAttribute object>,
 'type': <gavo.base.attrdef.EnumeratedUnicodeAttribute object>}