Re: my-func.py

2018-04-06 Thread Morten Welinder
> I understand there is a work group tackling the translation task.

There isn't.  There was, perhaps, a bit of shadow work aimed at something
not entirely unlike
that in the late 1990s.  Between bitrot and a moving target, there is
really no point in looking
for something that old, except possibly for giggles.

M.
___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list


re: my-func.py

2018-04-06 Thread Mike McClain
Never mind. I got it.
Next question: I've  a bunch of VBA code for massaging my Excel
stock tracking spreadsheet that I now need to port to Python/gnumeric.
I understand there is a work group tackling the translation task. How
do I find them?

Thanks,
Mike McClain
--
Happiness depends upon ourselves.
- Aristotle
___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list


Re: my-func.py

2018-04-06 Thread Morten Welinder
It's quite possible that this has bitrotted over the years.

Please file a bug for this at bugzilla.gnome.org, including what version of
Gnumeric you are using.

Morten


On Wed, Apr 4, 2018 at 1:17 AM Mike McClain  wrote:

> I'd like to move my portfolio tracker to gnumeric. Going through the
> manual I've followed the instructions but have something wrong. Though
> py_add is recognized I get 'Function implementation not available.'
> when putting '=py_add(2,3)' in a cell.
> The correct sample mentioned doesn't seem to be available.
> Here's my my-func.py:
> # my-func.py
> #
>
> from Gnumeric import GnumericError, GnumericErrorVALUE
> import Gnumeric
> import string
>
> example_functions = {
> # Add two numbers together
> def func_add(num1, num2):
> '@FUNCTION=PY_ADD\n'\
> '@SYNTAX=py_add(num1, num2)\n'\
> '@DESCRIPTION=Adds two numbers together.\n'\
> 'Look, the description can go onto other lines.\n\n'\
> '@EXAMPLES=To add two constants, just type them in: py_add(2,3)\n'\
> 'To add two cells, use the cell addresses: py_add(A1,A2)\n\n'\
> '@SEEALSO='
>
> return num1 + num2
>
> # Translate the func_add python function to a gnumeric function and
> register
> example_functions = {
> 'py_add': ('ff','num1,num2',func_add)
> }
>
> }
>
> Thanks for the help,
> Mike
> --
> We'll be friends till we're old and senile... Then we'll be new
> friends!!
> ___
> gnumeric-list mailing list
> gnumeric-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gnumeric-list
>
___
gnumeric-list mailing list
gnumeric-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gnumeric-list