MathGroup Archive 2005

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

Search the Archive

Re: Reloading packages: Removed[symbol]

  • To: mathgroup at
  • Subject: [mg57822] Re: Reloading packages: Removed[symbol]
  • From: "Stefan Linnik" <- at>
  • Date: Thu, 9 Jun 2005 05:18:19 -0400 (EDT)
  • References: <d869d6$cf2$>
  • Sender: owner-wri-mathgroup at


I keep some functions in a package in a file (called 'Std.m').
After altering a function(s) all I do is to re Evaluate
in the notebook and the new defintion(s) are immediately avaliable.

Not sure whether this is the same thing but I just thought I'd mention it.

Stefan Linnik

"Josef Karthauser" <joe at> wrote in message 
news:d869d6$cf2$1 at
> I want to reload a package that's already been loaded.  (Because it's
> been modified in another mathematica session and I want to take
> advantage of the new functionality.)
> I thought I was being clever by first removing all the package symbols
> with Remove[] and then removing the package name from $Packages.  This
> allows me to reload the package, but I'm left with a dilemma.
> Definitions that are in memory that referenced the symbols that have
> been removed have been replaced with 'Removed["symbol"]' and I can't
> seem to match them to turn them back.
> Is there a way of reloading a module?  How do I fix this problem?
> The string of operations to reload MyPackage was:
>    Remove["MyPackage`*"]
>    Unprotect[$Packages];
>    $Packages = Select[$Packages, =AC StringMatchQ[#, "MyPackage`*"] &];
>    Needs["MyPackage`"]
> My problem now is effectively:
>    In: a = MyPackage`Foo[]
>    In: Remove["MyPackage`*"]
>    In: a // FullForm
>    Out: Removed["Foo"][]
> How do I convert a back?
>    In: a /. Removed[x_] :> Symbol[x]
> Doesn't do anything :(.
> Joe
> --
> Josef Karthauser (joe at
> FreeBSD (cvs meister, admin and hacker)
> Physics Particle Theory (student)
> ================ An eclectic mix of fact and theory. =================

  • Prev by Date: Re: Output from Export[ ] (suggestion to Wolfram)
  • Next by Date: Re: Keeping the Legendre polynomials in expressions without finding the explicit polinomials
  • Previous by thread: Reloading packages: Removed[symbol]
  • Next by thread: BinaryIO