[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: path for an installed package

From: Colin Macdonald
Subject: Re: path for an installed package
Date: Sat, 18 Oct 2014 22:32:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0

On 15/10/14 16:02, Carnë Draug wrote:
>> How can I find the "base directory" where my package is installed?
> Here's how to do it:
>   pkg_l = pkg ("list");
>   idx = strcmp (your_pkg, cellfun (@(x) x.name, pkg_l, "UniformOutput", 
> false));
>   if (! any (idx))
>     error ("the package %s is not installed", your_pkg);
>   endif
>   pkg_path = pkg_l{idx}.dir

Thanks!  While thinking about the distinction between running a
package and working on a local copy, I realized for what I wanted, I
could just do:

  mydir = fileparts (mfilename ('fullpath'))

(this is not quite an answer to what I originally asked but I figure
it might be useful for someone else reading this thread in the future!)

thanks again,

Attachment: 0xC5326EE5.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]