MathGroup Archive 2007

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

Search the Archive

Clean-up code for packages

  • To: mathgroup at
  • Subject: [mg74910] Clean-up code for packages
  • From: "Szabolcs" <szhorvat at>
  • Date: Wed, 11 Apr 2007 01:53:43 -0400 (EDT)

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,

  • Prev by Date: Re: Length of random index into list
  • Next by Date: Beginner--Help on Listing Values
  • Previous by thread: RowReduce and SparseArray
  • Next by thread: Re: Clean-up code for packages