Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: basic namespace question, and access to BinarySearch

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131623] Re: basic namespace question, and access to BinarySearch
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Thu, 12 Sep 2013 02:27:05 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

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