Re: Reloading packages: Removed[symbol]
- To: mathgroup at smc.vnet.net
- Subject: [mg57822] Re: Reloading packages: Removed[symbol]
- From: "Stefan Linnik" <- at mk-nntp-1.news.uk.worldonline.com>
- Date: Thu, 9 Jun 2005 05:18:19 -0400 (EDT)
- References: <firstname.lastname@example.org>
- Sender: owner-wri-mathgroup at wolfram.com
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.
"Josef Karthauser" <joe at tao.org.uk> wrote in message
news:d869d6$cf2$1 at smc.vnet.net...
> 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:
> $Packages = Select[$Packages, =AC StringMatchQ[#, "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 :(.
> Josef Karthauser (joe at tao.org.uk) http://www.josef-k.net/
> FreeBSD (cvs meister, admin and hacker) http://www.uk.FreeBSD.org/
> Physics Particle Theory (student) http://www.pact.cpes.sussex.ac.uk/
> ================ 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: