MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: basic namespace question, and access to BinarySearch


On 9/10/13 at 3:33 AM, alan.isaac at gmail.com (Alan) wrote:

>What is the proper way to get access to a package without adding
>that package to $ContextPath?

There is not a proper way to do this.

>If I use Needs, the package name is added to $ContextPath.  (Of course I can remove items from
>$ContextPath.)

Yes it is possible to delete something from $ContextPath. But
once you do that you won't be able to access the functions in
the package normally.

That is try the following:

Load some package then do:

t=First@$ContextPath;
$ContextPath = Rest@$ContextPath;

Now note none of the functions in the package are available to
you using normal calls. Those functions can be restored by doing:

$ContextPath=Join[{t},$ContextPath];






  • Prev by Date: Re: Incorrectly Cropped ListPlot
  • Next by Date: Re: NDSolve is using Solve?
  • Previous by thread: Re: basic namespace question, and access to BinarySearch
  • Next by thread: question about ndsolve