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 environ
(self, expression)
| 106 | self.active_calltip.showtip(argspec, sur_paren[0], sur_paren[1]) |
| 107 | |
| 108 | def fetch_tip(self, expression): |
| 109 | """Return the argument list and docstring of a function or class. |
| 110 | |
| 111 | If there is a Python subprocess, get the calltip there. Otherwise, |
| 112 | either this fetch_tip() is running in the subprocess or it was |
| 113 | called in an IDLE running without the subprocess. |
| 114 | |
| 115 | The subprocess environment is that of the most recently run script. If |
| 116 | two unrelated modules are being edited some calltips in the current |
| 117 | module may be inoperative if the module was not the last to run. |
| 118 | |
| 119 | To find methods, fetch_tip must be fed a fully qualified name. |
| 120 | |
| 121 | """ |
| 122 | try: |
| 123 | rpcclt = self.editwin.flist.pyshell.interp.rpcclt |
| 124 | except AttributeError: |
| 125 | rpcclt = None |
| 126 | if rpcclt: |
| 127 | return rpcclt.remotecall("exec", "get_the_calltip", |
| 128 | (expression,), {}) |
| 129 | else: |
| 130 | return get_argspec(get_entity(expression)) |
| 131 | |
| 132 | |
| 133 | def get_entity(expression): |
no test coverage detected