Re: Controlling gnumeric from Python



Alexey Goldin wrote:
Ok, another trick question :-)

What is libgnumeric and where do I find it?
  
Sorry about that -- Jody has been mentioning libgnumeric for a while now, I suspect it is still partially vapourware.

Gnumeric is built as a model/view/controller + my understanding is that Jody was working towards splitting out the interface to the model part of this to libgnumeric.

The idea being that you don't need a gui to talk to the model, if for example you are some sort of script.

Once libgnumeric exists then the next thing to do would be to create wrappers for everyone's favourite scripting language.   The python console would use these wrappers to interact with the model (and hence the current view in the GUI).   Stanalone python  scripts would be able to  use the libgnumeric  interface to  read/write/modify  gnumeric sheets  without a GUI.

The py-gnumeric.c code you are working with is a much earlier attempt to produce python wrappers for gnumeric.  For a long time this has come with warnings that the API is nothing like fixed + that is one major reason why it hasn't had more work done on it.

Basically, the project has been waiting for someone with the time and energy to work out the API.   I think scripting is very high on Jody's wish-list for 1.5, so things might be about to change very soon.

Meanwhile, one other thing you might like to investigate is py-func.py -- this is an example of how to extend gnumeric with your own functions written in python -- no substitute for full python scripting, but if you just want to knock up some custom functions then a good way to go.

John
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]