[Geany] calltips for python?

Ing. Nestor Alonso Torres nestor at xxxxx
Mon Feb 25 13:41:49 UTC 2008


On Fri, 2008-02-22 at 16:12 -0600, Jeff Pohlmeyer wrote:
> Following John's idea, here is a Lua script to implement
> some crude "bubbletip" support...
> 
> 
> First, create the calltips file:
> ~/.geany/plugins/geanylua/support/calltips
> 
> This syntax for the file is simply pairs of lines,
> the first line is the identifier and the second is
> the calltip. for example:
> 
> -------------<snip>-------------
> someword
> This is the calltip for some word
> anotherword
> This is the calltip for another word
> thirdword
> This is the calltip for the third word
> -------------</snip>-------------

That could work for the python libraries (standing that will not change
very often), but that will not work when I import a "write by myself"
library... I still thinks that the solution is using the python's
built-in functions for documentation:

>>> import os.path

Getting function description:

>>> print os.path.isfile.__doc__
Test whether a path is a regular file

We could import automatically (dynamically) any library or function that
the user imports in his/her code, and access to its __doc__ property
whenever he types it. Also, when the user uses an object, we can call
the dir function, to give him autocompletion.


The only drawback I see for this approach is that we need to have a
python console up (and consuming memory), but just that.

Any ideas for implementing a Proof of Concept?

Best regards,

nat:.




More information about the Users mailing list