pyroxide.util.callback (version 19 , 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) )
index
/usr/lib/python2.4/site-packages/pyroxide/util/callback.py

Utility to load modules and instantiate classes.

 
Functions
       
call(fullPath, args=())
Call the given callable with the given args.  If a class, instantiate.
 
args must be passed in as a list.  Therefore, a single argument must be
passed like so:
    
    call( fullPath, (arg,) )
 
If args is None then it will be treated as an empty list (same as the
default.)
If you wish to instantiate a class with the argument of None then args
should equal (None,).
 
Raises ImportError if it fails to import the module.
Raises AttributeError if there is no callable in the module.
getReference(fullPath)
Obtain a reference to the callable described by the given fullPath.
 
Raises ImportError if it fails to import the module.
Raises AttributeError if there is no callable in the module.

 
Data
        __HeadURL__ = '$URL: http://pyroxide.org/svn/pyroxide/trunk/src/main/python/pyroxide/util/callback.py $'
__Id__ = '$Id: callback.py 19 2006-12-11 07:18:58Z kevin $'
__LastChangedBy__ = '$Author: kevin $'
__LastChangedDate__ = '$Date: 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) $'
__Revision__ = '$Rev: 19 $'
__copyright__ = '(c) 2006 rootsmith Inc.'
__credits__ = 'Thanks to Serge Eby who first coded this module'
__date__ = ' 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) '
__version__ = ' 19 '

 
Credits
        Thanks to Serge Eby who first coded this module