[Date Index] [Thread Index] [Author Index]
AW: Help needed!
Hi Lian, "usually" you should be able to load the package \....\<mathematica root directory>\AddOns\ExtraPackages\ABC.m with <<ExtraPackages`ABC` You should spend a look on your $Path. "\....\<mathematica root directory>\AddOns" should be on it. If not, you should append it (e.g. = AppendTo[$Path, "\....\<mathematica root directory>\AddOns"] ). You can do that automatically if you add this command to your kernel init.m package. If the above statement is element of $Path, you should also be able to lo= ad your package with <<ExtraPackages//ABC.m If = <<ExtraPackages`ABC` still does not work, you might have to look at the function ContextToFilename. I am not a unixian! This function does exist in Mathematica 2.2 under Windows and maybe does not under Unix. If the BeginPackage[ ] statement in your ABC.m defines an other context then ExtraPackages you might get an error message using <<ExtraPackages`ABC`. For example: = BeginPackage["Alphabet`ABC`"] = will create functions of the ABC package in the context "Alphabet`ABC`". The command <<ExtraPackages`ABC` will try to create the context "ExtraPackages`ABC`" by reading = ExtraPackages//ABC.m (or something defined by ContextToFilename[ ] - unde= r Windows 3.x it will truncate the long package names to the 8.3 filename length convention). This will not result in creating the above context but in creating "Alphabet`ABC`" and thus will cause an error message like "unable to crea= te context 'ExtraPackages`ABC`'". See "The Book" or Roman Maeders "Programming in Mathematica" (Addison Wesley) for more details. Good luck, Peter ---------- Von: Lian SHEN[:] Gesendet: Freitag, 25. Juli 1997 12:35 An: INTERNET:mathgroup at smc.vnet.net Betreff: [mg7951] Help needed! by arl-img-5.compuserve.com (8.8.6/8.8.6/2.2) with SMTP id GAA18785; Fri, 25 Jul 1997 06:35:23 -0400 (EDT) id CAA09122; Fri, 25 Jul 1997 02:40:27 -0400 id CAA09116; Fri, 25 Jul 1997 02:40:27 -0400 From: Lian SHEN <lian at lsm.iet.mavt.ethz.ch> To: mathgroup at smc.vnet.net Subject: [mg7964] [mg7951] Help needed! Organization: Swiss Federal Institute of Technology (ETHZ) Hi, everyone here, I have a question about additional package for Mathematica3.0 After I have installed the additional package ABC under /usr/local/math/mathematica/AddOns/ExtraPackages/ I can start it by giving the full path, i.e. by giving /usr/local/math/mathematica/AddOns/ExtraPackages/abc/ABC.m Is there any possibility to make the life easy, something like the path variable in UNIX? thanks! lian -- = ------ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= | Lian Shen Unix System Administrator | | Swiss Federal Institute of Technology, Zurich ETH-Zentrum, CH-8092 | | Tel: +41 1 632 5297, Fax: +41 1 632 1138, Office: UNO D11 | | "God is a mathematician of very high order, and he used very advanced | | mathematics in constructing the universe." (P.A.M. Dirac) = | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=