Hi Allin,
Thank you very much for this quick response. I'm running Gretl on
Windows 7. By "gretl-executable", do you literally mean
gretl-executable or gretl.exe (I assume the latter)?
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
_____________________________________________________
On 3/3/2013 12:06 PM, Allin Cottrell wrote:
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