Dear Sven and Artur,
many thanks. I tried Arturs approach (as I understood it), but to no avail. If I got you
correct, Artur, you pass the information of the path "by memory". I.e. before
loading the first script, you save a string with that scripts path and then, in that
script, you make use of this path. For me that did not work...
I will instead make use of Svens suggestion and checkout the working copy into one of the
gretl folders, directly.
Thx!
Frederik
-----Ursprüngliche Nachricht-----
Von: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users-
bounces(a)lists.wfu.edu] Im Auftrag von Sven Schreiber
Gesendet: Donnerstag, 4. Januar 2018 20:02
An: gretl-users(a)lists.wfu.edu
Betreff: Re: [Gretl-users] dotdir / getenv alternative for scriptdir?
Am 04.01.2018 um 19:10 schrieb Schaff, Frederik:
> Ah, the thing is that the scripts are lying in a separate folder from
> the one I am using. I have a general repository for the scripts and
> "load" the functions within them whenever I need them (and improve
> them, too). Gretl itself seems to have no problem with scripts
> relative to the scripts own path if I have the script open. However,
> in my example, I have a script "A" for a current project open and from
> this load a script "B" which again loads a bunch of other scripts
"C"
> defined with relative paths to "B". I do, however, not try to move
> "up" in the paths.
OK, I understand.
Perhaps you should either put your script repository where gretl will always
find it, like the user dir (see table 4.1 in the manual), which under Windows
should be C:\Users\<yourusername>\Documents\gretl
and under Linux:
~/gretl
Then you wouldn't need to mess with paths at all in your scripts, just do
"include me.inp".
Or if for backup purposes or whatever you want to put them somewhere
else, switch to using "more absolute" paths. What I mean is paths that are
only relative to the user's home directory. (You can get that path prefix on
Windows with 'getenv("userprofile")', and on Linux with
'getenv("HOME")'.)
hth,
sven
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users