On Wed, 3 Jan 2007, Sven Schreiber wrote:
Ok, I found out about nelem() etc. in the meantime, so it's easy
to do what I want anyway.
I now have a prototype working of a gretl function package which
passes the user input and the data to a NumPy (numerical python)
Vecm class to do some calculations which are not implemented in
gretl natively, and python then stores the results in a gretl
script file, such that they can be loaded into gretl easily. I
call this rudimentary framework py4gretl :-)
Sounds nice!
In relation to all that I have a short wishlist for Allin and Jack:
1) Could 'include' and/or 'run' also be made available inside
functions? That way the output from my python program could be
read into gretl automatically via a temp script file. I guess
this should even be less problematic than the '!' issue we
discussed earlier.
"include" is designed for files that define functions, and right
now you can't define functions inside functions (a fairly common
limitation in programming languages). As for "run" inside
functions, that is possible, but is much less easy than allowing
the "!" shell escape. I'll think about it.
2) IMHO the 'outfile' command should behave like
'store' (after
the recent changes in cvs) with respect to where it creates the
file, including honoring the user preference setting, like we
discussed for 'store' in a recent thread.
Yes, that makes sense.
3) less important: currently it seems impossible to specify an
empty list in the function package GUI, although it would be
useful as an option.
Agreed.
Allin.