Package scripts :: Package objects :: Script base :: Class Scriptable
[hide private]
[frames] | no frames]

Class Scriptable

source code

object --+    
         |    
BaseObject --+
             |
            Scriptable

Allows objects to have predefined scripts executed on certain events

Instance Methods [hide private]
 
__init__(self, scripts=None, **kwargs)
Init operation for scriptable objects
source code
 
runScript(self, event)
Runs the script for the given event
source code
 
setScript(self, event, func, args=None, kwargs=None)
Sets a script to be executed for the given event.
source code

Inherited from BaseObject: getStateForSaving, trueAttr

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, scripts=None, **kwargs)
(Constructor)

source code 

Init operation for scriptable objects

Parameters:
  • scripts (Dictionary) - Dictionary where the event strings are keys. The values are 3-item tuples (function, positional_args, keyword_args)
Overrides: object.__init__