Riccardo (Jack) Lucchetti schrieb:
On Wed, January 10, 2007 13:07, Sven Schreiber wrote:
This sound very cool indeed. Could you post some examples of functions calling
python and carrying the results back into gretl? We may
1) get a taste of what's in store
2) check if there's anything tricky to set to get python working properly
3) start hacking on python (something I've wanted to do for a long time)
The more trivial the better, like for example take two matrices, use python to
multply them and shuffle the result back into gretl.
Sure. I have attached a script with a stripped-down "hello world"
version. It has the python stuff embedded in it. In principle you just
have to open and run it and it should work cross-platform, but so far
it's only tested on my own (Ubuntu) system.
You need to have Python and the NumPy extension (>=1.0) installed, see
new.scipy.org. (For Windows there are binary installers, for Linux
compilation of numpy is pretty easy.)
You might have to adjust the python calls (in the 19th and 13th lines
from bottom) if the command or version is different for you. (E.g. I
need to call python2.5 because that's where numpy is installed.)
It exports data from gretl, not matrices, because that's what I needed
and what I have ready. But it imports matrices from python.
As I already mentioned, after some testing and extensions I will upload
the py4gretl_vecm package to the function package server, after 1.6.1 is
out. Then people can test some more, if they find it useful. When
approx. will 1.6.1 be released?
cheers,
sven