'Return the argument list and docstring of a function or class.
If there is a Python subprocess, get the calltip there.  Otherwise,
either this fetch_tip() is running in the subprocess or it was
called in an IDLE running without the subprocess.
The subprocess environment is that of the most recently run script.  If
two unrelated modules are being edited some calltips in the current
module may be inoperative if the module was not the last to run.
To find methods, fetch_tip must be fed a fully qualified name.'

def fetch_tip(self, expression):

    try:
        rpcclt = self.editwin.flist.pyshell.interp.rpcclt
    except AttributeError:
        rpcclt = None
    if rpcclt:
        return rpcclt.remotecall('exec', 'get_the_calltip', (expression,), {})
    else:
        return get_argspec(get_entity(expression))
