def serviceCommand(methodName, cmdClass=ServiceWrapperCommand):
 def wrapper(obj, journal, *args, **kwargs):
  return journal.executeCommand(cmdClass(methodName, args, kwargs))
 return wrapper

def serviceCommand ( methodName , cmdClass = ServiceWrapperCommand ) : def wrapper ( obj , journal , * args , ** kwargs ) : return journal . executeCommand ( cmdClass ( methodName , args , kwargs ) ) return wrapper
wrap methods into commands for a journalled service .