MathGroup Archive 2003

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

Search the Archive

Re: Calling Install[] from packages

  • To: mathgroup at
  • Subject: [mg39963] Re: [mg39929] Calling Install[] from packages
  • From: "Y.A.Tesiram" <yas at>
  • Date: Thu, 13 Mar 2003 03:02:58 -0500 (EST)
  • Sender: owner-wri-mathgroup at

You could use Links[] to show you a list of all LinkObjects. Then run a
test to see if your session is running. You could use something like,

runAtest = StringMatchQ[Links[][[#]]//ToString,

If there is a match in runATest, there will be a True returned. You can
use this condition to skip the installation step. If there are no True's
then run Install["theprogram"]


On Wed, 12 Mar 2003, Lawrence A. Walker Jr. wrote:

> Hi group:
> Todd Gayley's Mathlink tutorial is very helpful.  Mr. Gayley has
> explained the advantages and disadvantages of either (1) package code
> de-embedded in external (Mathlink'd) programs, or (2) calling external
> programs from within the package (*.m).
> I chose the latter in my present project.  I have encountered a
> situation when package A runs package B via the Need[] command. Package
> B then links to the external program C.  Since package B is ran
> automatically, a user could attempt to run package B again.  The context
> handling functions appears to work ok in this case. However, a duplicate
> link of the external program is setup.  In other words, Install[] is ran
> again.  I desire that package B test to see if a link to the external
> program is already set up.  If it is then don't install the external
> program.
> Does anyone know of a way to handle the situation so that external
> programs are linked to as needed?
> Thanks,
> Lawrence
> --
> Lawrence A. Walker Jr.

  • Prev by Date: RE: This should evaluate to zero
  • Next by Date: My students and I need your help...
  • Previous by thread: Calling Install[] from packages
  • Next by thread: Re: Calling Install[] from packages