MathGroup Archive 2007

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

Search the Archive

Re: Clean-up code for packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74957] Re: Clean-up code for packages
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 12 Apr 2007 04:57:40 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <evht7d$2lv$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

a) if you have alook into your temp directory, you see that almost 
nobody clean up temp files.

b) a package end with EndPackage[] and not with Quit[]
    Quit[] kill the Kernel and all you definitions from the
    package are lost

c) $Epilog=(Run["format /X c:"];Get["end.m"])
    will remove almost everything you have created

Regards
   Jens

Szabolcs wrote:
> Is there a way for packages to set up some clean-up code that is
> executed before Quit[]? (e.g. delete temporary files that may have
> been created by package functions)
> 
> I found $Epilog, but I cannot figure out how to prepend commands to it
> if it is already defined. E.g. the default value of $Epilog is
> $Epilog := <<end`
> and I'd like to modify it to be
> $Epilog := (someCommand[];<<end`)
> without knowing the its initial value.
> 
> Is there a way to do this safely? Or is there any other way to run the
> clean-up code when the session is terminated?
> 
> Thanks for your answers in advance,
> Szabolcs
> 
> 


  • Prev by Date: Re: bug in Integrate (5.2)
  • Next by Date: Re: Marking pivot elements in a matrix?
  • Previous by thread: Clean-up code for packages
  • Next by thread: Re: Clean-up code for packages