On Tue, 30 Jul 2019, Artur Tarassow wrote:
Hi all,
Since gretl supports the idea of package dependencies now, I think it's
useful to add an accessor to a package's version for checking that the
required version is actually installed on the system.
In python one has those magic methods of which one is PACKAGE.__version__. Do
we have such an accessor available in gretl? Given that it exists in the
spec-file it should be possible to grab it, or not?
If you know where your package file is located, you could use our xmlget()
function, as in
<hansl>
pkgdata = readfile("(a)dotdir/functions/latextab.gfn")
eval xmlget(pkgdata, "/gretl-functions/gretl-function-package/version")
</hansl>
That said, we could have a "version" qualifier to the "pkg" command,
and
possibly store the output under some $-accessor ($result, maybe?).
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------