Re: Expanding $Path
- To: mathgroup at smc.vnet.net
- Subject: [mg47277] Re: Expanding $Path
- From: "John Jowett" <John.Jowett at cern.ch>
- Date: Fri, 2 Apr 2004 03:30:23 -0500 (EST)
- Organization: CERN
- References: <c4ghb6$3s6$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Harold,
You can use these packages from their original location anytime just by
evaluating, e.g.,
Needs["Utilities`CleanSlate`"]
This is the standard mechanism I believe. However it it is really necessary
to modify your $Path for some other reason, I believe that the (or at least
one) "right" way to add an entry to $Path for a given user is to go to
$UserBaseDirectory
This may already contain a sub-directory called Kernel. If not create it and
put the
AppendTo[$Path, .... ]
in a file init.m in that sub-directory. This is a place where you can also
put other expressions that the kernel should always evaluate on startup
(e.g., you might always want to load some package with Needs[ ]).
To modify the path for all users of the computer, use $BaseDirectory instead
of $UserBaseDirectory.
Sometimes (e.g. for testing a development version of a package) it is useful
to use PrependTo instead of AppendTo.
Incidentally, I don't seem to have URLTools in my installation.
John Jowett
"Harold Noffke" <Harold.Noffke at wpafb.af.mil> wrote in message
news:c4ghb6$3s6$1 at smc.vnet.net...
> $Version "5.0 for Microsoft Windows [2000] (November 18, 2003)"
> MathGroup:
>
> There are three default files in
> ...\5.0\AddOns\ExtraPackages\Utilities which I would like to add to my
> default search $Path ...
>
> CleanSlate.m
> Notation.m
> URLTools.m
>
> The easiest place to put this new $Path entry would be at the end of
> the current $Path, using ...
>
> $Path = AppendTo[$Path, $NewDir]
>
> However, I'm uncertain about how to permanently save the expanded
> $Path, so Mathematica uses it again. How should this be done?
>
> Thanks.
> Harold
>