global serverCaps serverCaps = [] serverCaps.append("maxRequestSize:" +str(maxRequestSize)) serverCaps.append("heartbeatTime:" +str(heartbeatTime)) def f(self,cmd,*args): return ["serverCaps"] + serverCaps commands["serverCaps"] = f