On Thu, April 12, 2007 14:59, Allin Cottrell wrote:
On Thu, 12 Apr 2007, Sven Schreiber wrote:
> So I am thinking of other places to store the temp files. However,
> py4gretl needs to pass that information from the gretl side to the
> python side, so it's name must somehow be accessible from gretl script.
>
> Hence my question: what type of environment variables can be used in a
> script? Or any other ideas on a good place to store temp files (on all
> supported platforms)?
See chapter 11, section 2 of the User's Guide, sub-head "Built-in
strings". You have "@userdir" which gives the user directory,
which must be writable (or else gretl will fail at startup).
We could maybe add a "getenv" function for strings, so you could
grab variables in the external environment.
That'd be very useful. I am currently working on a paper where I had to
run a number of Monte Carlo experiments. I managed to hack a shell script
with some grep/sed magic to get what I wanted, but getenv() would have
been very useful. sprintf() would also be good.
(Yeah, I know, I could have coded those myself, but I'm too busy atm.
Besides, once I'm done with this paper, I need to find some time to put
fft() in good shape and write some documentation).
Riccardo (Jack) Lucchetti
Dipartimento di Economia
FacoltĂ di Economia "G. FuĂ "
Ancona