Logo Search packages:      
Sourcecode: pymol version File versions

def pymol::rpc::rpcHelp (   what = ''  ) 

returns general help text or help on a particular command 

Definition at line 348 of file rpc.py.

00348                     :
  """ returns general help text or help on a particular command """
  global serv
  res = 'Command Not Found'
  if not what:
    res = serv.funcs.keys()
  else:
    funcs = serv.funcs
    if funcs.has_key(what):
      fn = funcs[what]
      res = "Function: %s("%what
      defs = fn.func_defaults
      if defs:
        code = fn.func_code
        nDefs = len(defs)
        args = []
        i = -1
        for i in range(code.co_argcount - nDefs):
          args.append(code.co_varnames[i])
        for j in range(nDefs):
          vName = code.co_varnames[j+i+1]
          args.append("%s=%s"%(vName,repr(defs[j])))
        res += ','.join(args)
      res += ')\n'
      if fn.func_doc:
        res += fn.func_doc
  return res  


def launch_XMLRPC(hostname='localhost',port=_xmlPort,nToTry=_nPortsToTry):


Generated by  Doxygen 1.6.0   Back to index