[cazzola di unimi it: Re: [gnumeric-list] Re: python plugins]





Actually many Linux distros ahve already switched to Python 3 though 2
may be available in the repositories.

https://www.quora.com/When-is-it-estimated-that-Linux-distros-will-no-longer-include-Python-2-7

----- Forwarded message from Walter Cazzola <cazzola di unimi it> -----

Date: Fri, 3 Apr 2020 13:15:39 +0200 (CEST)
From: Walter Cazzola <cazzola di unimi it>
To: Jean Br?fort <jean brefort normalesup org>
Cc: gnumeric-list gnome org
Subject: Re: [gnumeric-list] Re: python plugins

Hi,
this wouldn't be a problem but the module gnumeric is missing also in pip2.
Even if deprecated and end-of-life since January python2 is still installed in
any linux box.

Walter

On Fri, 3 Apr 2020, Jean Br??fort wrote:

Hi,

The Python support in gnumeric is limited to Python-2, it can't work
with Python-3.

Regards,
Jean

Le jeudi 02 avril 2020 ?? 22:10 +0200, Walter Cazzola a ??crit :
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
gnumeric-list gnome org
https://mail.gnome.org/mailman/listinfo/gnumeric-list

----- End forwarded message -----

-- 

      _
     | |          Robert W. Hayden
     | |          5 Howard Street, Apartment 206
    /  |          Wilton, New Hampshire 03086  USA
   |   |          
   |   |          email: bob@ the site below
  /    |          website: http://statland.org
 |   x /          
 ''''''         




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