python plugins

Walter Cazzola <[email protected]> Thu, 2 Apr 2020 22:10:06 +0200 (CEST)
Newsgroups gmane.comp.gnome.apps.gnumeric
Message-ID <alpine.LFD.2.21.2004021930510.5405@hymir>
Dear All,
I'm a long time user of gnumeric, today I would like to add a quite simple
python plugin that I'm writing but I have hard time to:
   - find the gnumeric module that all the examples I found around import
   - find some recent tutorial/documentation about python plugin development

I already did some attempt without much luck. My test is:

    from Gnumeric import GnumericError, GnumericErrorVALUE
    import Gnumeric
    import string

    def test_func(coord):
      return coord

    test_functions = {
       'test_func' : test_func
    }

stored in ~/.gnumeric/1.12.46/plugins/test/test_func.py with the plugin.xml

<?xml version="1.0"?>
<plugin id="Gnumeric_ExamsPlugin">
 	<information>
 		<name>Python Test Plugin</name>
 		<description>A test for python plugins.</description>
 	</information>
 	<loader type="Gnumeric_PythonLoader:python">
 		<attribute name="module_name" value="test"/> 3
 	</loader>
 	<services>
 		<service type="function_group" id="test"> 4
 			<category>Local Python</category>
 			<functions>
              <function name="test_func"/>
 			</functions>
 		</service>
 	</services>
</plugin>

but I can't compile it because of the import (no module is found) and when I
try to select it in tools→plugins I get the error:

   Error while activating plugin "Python Test Plugin".
   Error while activating plugin dependencies.
   Couldn't find plugin with ID="Gnumeric_PythonLoader".

To me seems quite evident that the module gnumeric is not in my system but I
can't find it neither through pip/pip3, through "dnf search" nor googling it.

I'm on a fedora linux box with gnumeric 1.12.46, python 3.7

Any help is really appreciated.

-- 
_______________________________________________
gnumeric-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnumeric-list