Extendion Gideon With Python or sth else
BERND.GEHRMANN at gruppotc.com
Fri Oct 18 15:22:05 UTC 2002
> -----Original Message-----
> From: Max [mailto:listposter at machsim.com]
> Sent: giovedì, 17. ottobre 2002 15:35
> To: kdevelop-devel at kdevelop.org
> Subject: Extendion Gideon With Python or sth else
> Is it possible to write a python script to enhance Gideon ?
> For example I would like to select a piece of text in the editor and
> select the python script, then this script could modify this text ?
The first is the tools menu, in which you can insert arbitrary
programs written in any language you like. You can give certain
parameters, like the currently edited file name, directory and so
on (is that documented somewhere?)
Second, there is a filter plugin. It allows you to send the contents
of an edit buffer through an external program. That means, the
current contents of the buffer are sent to the program via stdin,
and the program's stdout is inserted into the buffer.
Both of these approaches have the disadvantage that the external
program is started on request and stops after it finishes its job.
So it can't retain state between invocations, and it can't react
to 'events' occuring in the IDE. This gap is filled by the scripting
part which embeds a Python interpreter. Scripts using this part can
be very powerful if the IDE provides a sufficiently high number of
signals. As a starting point, you can find example scripts which
react on a project being opened. Unfortunately, the part is not
finished and does no exception handling. That means, if your script has
a bug, the Python interpreter stops and you have to restart the
whole IDE to execute a script again... anyway, this certainly has
some potential if someone has interest in it.
More information about the KDevelop-devel