Module registry
[show private | hide private]
[frames | no frames]

Module registry

registry: the core of co2's xmlrpc functionality.
Classes
Co2Method registry-internal representation of a registered (i.e.
Co2Registry holds all xmlrpc methods, registers system methods, initializes the plugin loader, and handles all incoming calls.

Exceptions
Co2RegistryError  

Function Summary
dictionary, key:value pairs are: 'args':arguments with no default values (list); 'args_d':arguments with default values (dictionary {'arg':<default value>}); 'args_v':variable arguments (list); 'args_kw':keyword arguments (list). (the latter two are python specific and of no relevance to xmlrpc.) format_argspec(argspec)
create a method signature.
boolean is_co2_method(obj)
helper method.
  make_reg_name(name)
create a name under which a method will be registered for access through xmlrpc.

Variable Summary
list sys_path

Function Details

format_argspec(argspec)

create a method signature. will be returned by calls to system.methodSignature(<method_name>) and aliases thereof.
Parameters:
argspec - as returned by inspect.getargspec
Returns:
formatted argument specs
           (type=dictionary, key:value pairs are: 'args':arguments with no default values (list); 'args_d':arguments with default values (dictionary {'arg':<default value>}); 'args_v':variable arguments (list); 'args_kw':keyword arguments (list). (the latter two are python specific and of no relevance to xmlrpc.))

is_co2_method(obj)

helper method. decide whether or not an object meets the definition of a co2-XMLRPC-method, ie. should be registered for XMLRPC access. a co2-XMLRPC-method is a class-(?) or instance-method whose name begins with 'x_' and is built into the registry.
Parameters:
obj - the object to be checked
           (type=object)
Returns:
boolean

make_reg_name(name)

create a name under which a method will be registered for access
through xmlrpc.

@param name: the name of a co2 method to be registered.
@type name: string.

naming conventions:
prefixes determine whether or not and if under what name methods are
registered (ie. XMLRPC-callable)
 methname      XMLRPCname     XMLRPC call
 x_top_<name>  <name>         proxy.<name>()
 x_co2_<name>  co2.<name>     proxy.co2.<name>()
 x_sys_<name>  system.<name>  proxy.system.<name>()
 (the last one is for userland (xmlrpc.com) compatibility)

Variable Details

sys_path

Type:
list
Value:
['/home/lu/devel/co2/co2-0.5.11',
 '/usr/bin',
 '/usr/local/lib/python23.zip',
 '/usr/local/lib/python2.3',
 '/usr/local/lib/python2.3/plat-linux2',
 '/usr/local/lib/python2.3/lib-tk',
 '/usr/local/lib/python2.3/lib-dynload',
 '/usr/local/lib/python2.3/site-packages']                             

Generated by Epydoc 1.1 on Thu Oct 16 16:37:22 2003 http://epydoc.sf.net