[Gretl-users] error with null list

Sven Schreiber svetosch at gmx.net
Thu Jan 4 06:00:17 EST 2007


Riccardo (Jack) Lucchetti schrieb:
> On Wed, January 3, 2007 15:14, Sven Schreiber wrote:
> 
>> 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.
> 
> I don't understand what the intended usage would be. I mean, you can already
> have nested "include" statements. Since we don't have nested functions, could
> you please explain to me why you need this, possibly with an example?
> 

It all revolves around gretl's nice function package GUI. Of course
everything could also be achieved simply in a regular script, using
'include' etc. However, I really would like to take advantage of the
GUI, it's much more user-friendly; well that's why you guys cooked it up
in the first place, right?

Ok, to be concrete, my prototype py4gretl mini-app does the following:

1) The user executes the function package py4gretl_vecm.gfn, and chooses
parameters like a list of endogenous variables and lists of restricted
and unrestricted exogenous variables, etc.

2) The gretl function then stores the data and parameters to temp files
via 'store' and 'outfile' commands, and then calls the corresponding
python script py4gretl_vecm.py via the shell escape '!'.

3) In the background python calculates the beta-matrix for example, and
then stores it in gretl format (e.g. 'beta = {1.3;2.4}') in another temp
gretl script file 'py4gretl-results.inp'.

4) Now the user must open 'py4gretl-results.inp' and execute it in order
to have the result (beta) available in gretl.

What I would like is that the gretl function runs the result file
automatically, so that the user action in step 4 is eliminated. Hence my
need for 'include' or 'run'.

Maybe I'm missing something, I'd be grateful for hints on how to achieve
that in another way.

cheers,
sven





More information about the Gretl-users mailing list