Re: how to convert VB scripts to Gnumeric python

Morten Welinder <[email protected]>
Newsgroups gmane.comp.gnome.apps.gnumeric
Message-ID <CANv4PN=dBV-q9fk3_2vCte84xPZg1Ebm6X6iVUQ79_-z5PaBEQ@mail.gmail.com>
If you are looking for easy scripting of such operations, then you will not
currently find it.
The python and perl plugins have never been used for anything serious as
far as I know.

Various parts of Gnumeric are available through gobject introspection and
therefore
are callable from python and, likely, other scripting languages.    In
principle the bindings
should work, but I haven't used them much myself.  You would be breaking
new trail
here.

Here's a sample that just does a numerical computation:

$ python
Python 2.7.12 (default, Dec  4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import Gnm;
__main__:1: PyGIWarning: Gnm was imported without specifying a version
first. Use gi.require_version('Gnm', '1.12') before import to ensure that
the right version gets loaded.
>>> Gnm.qnorm(0.2,0,1,0,0)
0.8416212335729144

Morten

_______________________________________________
gnumeric-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnumeric-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.