On Sun, 3 Mar 2013, Data Analytics Corp. wrote:
I'd like to start Gretl from another program. In particular,
I'd like
to start Gretl from a JMP script, send it a data file in CSV format, and
have the Gretl GUI appear with that data loaded. No Gretl scripts are
involved; I just want the data loaded and ready for analysis. I'm aware
of gretlcli but this seems to start gretl, execute a script file, and
then send the results to an output file. I just want to start it, have
it read a CSV file, and show the data in the GUI. Can this be done?
And if so, how?
Yes, it can done quite easily. The "how" depends on what sort
of program you're calling gretl from (and on what platform),
and how informative you want to be if something goes wrong.
In C the quick and dirty way is
system("gretl-executable datafile");
where gretl-executable and datafile would have to be wrapped
in quotes if the paths contain spaces.
But note that by default gretl expects to be able to read its
configuration from the user's home directory. If you want to
bypass that you can use the environment variable
GRETL_CONFIG_FILE, as described at
http://gretl.sourceforge.net/slave/ .
Allin Cottrell