no need for all that,i wrote a basic Ajax framework for cherrypy that
features a Ajax.Net feature,exposing functions to JavaScript via
attributes(or in python via decorators),here is a decorator that run
one time(i.e. before running the actual code) and get the name of the
class
[code]
def AddFunction(func):
stack=inspect.stack()
ClsName=stack[1][3]#get the class name from the stack
#now you both have the ClassName and the func object,so you can
populate your list
return func#return the decorated function
[/code]
it use the module inspect,to inspect the stack.
--
http://mail.python.org/mailman/listinfo/python-list