MathGroup Archive 1997

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

Search the Archive

Loading Packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg9558] Loading Packages
  • From: TTCJ34A at prodigy.com ( JOHN C ERB)
  • Date: Thu, 13 Nov 1997 01:40:21 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

Steve Wilkinson wrote:

>I have a problem that I have seen pop up on this list from time to 
time,
>but I can't make any of the answers that have appeared work. I 
can't
>load the packages I write into Mathematica 3.0 with either Get or 
Need.

Steve,

What works for me is:

Create a subdirectory (e.g., "Personal") in a directory that is in 
Mathematica's Path (you can
check this with "$Path").  Under Mathematica 3.0 I created a
subdirectory  (folder) named "Personal" under the
directory "AddOns."  Then I save my packages under the "Personal" 
subdirectory.

For example, I write a package called "Geom2D.m" and save it in the 
"Personal" subdirectory,
I can then load that package using Needs["Personal`Geom2D`"].

If you want to have your package on a floppy disk such as Drive A,  then
you need the
A drive to be in Mathematica's path; you can do this with
AppendTo[$Path, "A:"}.  Your package
needs to be in a subdirectory on Drive A; in my example the 
subdriectory on Drive A would
be called Personal, and the package Geom2D would be stored in that 
directory.

It took me two days to figure this one out - perhaps there are  "better"
answers, but
this one works for me.

John C. Erb


  • Prev by Date: NDSolve
  • Next by Date: Re: variable problems
  • Previous by thread: Loading packages
  • Next by thread: Re: Loading packages