MathGroup Archive 2009

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

Search the Archive

Re: loading autosaved package using Needs[]

  • To: mathgroup at
  • Subject: [mg95114] Re: [mg95083] loading autosaved package using Needs[]
  • From: "David Park" <djmpark at>
  • Date: Wed, 7 Jan 2009 04:06:00 -0500 (EST)
  • References: <29851476.1231233242138.JavaMail.root@m02>

Because WRI doesn't have the slightest interest in giving users a coherent
description of how to write packages, where to put them, and how to load

Basically, you have to put the package in a folder in your private
Applications folder and then include the folder name in the Needs statement
as a leading context.

The Presentations package gives an example of a package with extensive
annotation and explanation, and shows where to put it and how to load it.
There is also an essay on writing packages.

David Park
djmpark at  

From: Mitch Murphy [mailto:mitch at] 

according to comment at the top of autosaved packages, these files can  
be loaded using Needs[] instead of Get[].

(* This file was generated automatically by the Mathematica front  
end.  *)
(* It contains Initialization cells from a Notebook file,  
which         *)
(* typically will have the same name as this file except ending  
in      *)
(* ".nb" instead of  
".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel  
using *)
(* the package loading commands Get or Needs.  Doing so is  
equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the  
front *)
end.                                                                 *)

it doesn't work for me...

	Needs::cxt: Invalid context specified at position 1 in  
Needs[phd_thesis_common.m]. A context must consist of valid symbol  
names separated by and ending with `. >>

any help/suggestions appreciated.


  • Prev by Date: Re: Front end tokens and window maximization
  • Next by Date: Re: loading autosaved package using Needs[]
  • Previous by thread: Re: loading autosaved package using Needs[]
  • Next by thread: inverting Laplace transforms