On Sat, Jan 26, 2013 at 7:58 AM, Riccardo (Jack) Lucchetti <r.lucchetti@univpm.it> wrote:
On Sat, 26 Jan 2013, Pietro Battiston wrote:

Hello everybody,

I love Gretl's "foreign" code blocks capability, and would love even
more the possibility of using Python in them, which was at some time
suggested as easy to implement.¹

1) Has there been any development in this direction? If not, was it
because of lack of time/interest or because of unexpected obstacles in
the process?

Lack of manpower, I would say. I'm not overly familiar with python, but it certainly is a language worth supporting.

Curious what level of integration `foreign` provides. This is the first I've heard of it. Is the idea that you want to put gretl data into a numpy array, do some operation in Python, and then move the results back to a gretl data structure? NumPy provides a C-API, so you wouldn't actually have to write any Python code to make the data ferrying possible.

As an aside, I've often wanted to wrap the gretl library code in Python using Cython, so I could use the gretl C/C++ model code from Python, but much of the numerical python stack is BSD-compatible and this makes me wary to introduce a GPL library. (No license flame war comments intended.)

Skipper
 


2) In general, could it be feasible to apply structural changes on
gretl's dataset (i.e. remove/collapse observations) from foreign blocks?
Or will "append" remain the only reasonable channel of communication
from foreign blocks to gretl?

No, there's no way to modify the current dataset from a foreign block. However, you could use the foreign block to write the data you need to temporary files (as .mat files for matrices, presumably csv files for a whole dataset) and then, after "end foreign", do a "dataset clear" plus open/join/append/mread()/whatever you need.

-------------------------------------------------------
  Riccardo (Jack) Lucchetti
  Dipartimento di Scienze Economiche e Sociali (DiSES)

  Universitą Politecnica delle Marche
  (formerly known as Universitą di Ancona)

  r.lucchetti@univpm.it
  http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users