MathGroup Archive 1999

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

Search the Archive

Re: How to: Read Notebook and auto-evaluate ?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21127] Re: How to: Read Notebook and auto-evaluate ?
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Fri, 17 Dec 1999 01:21:25 -0500 (EST)
  • References: <831gnl$dak@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Lou,

    NotebookOpen["file path"];

will open your notebook,just like double clicking it (this is still related
to the file and any changes to it that are saved will be reflected in the
file)

    NotebookPut[Get["file path"]];

will open a copy of your notebook (changes to this will not affect the
original)

Get will give the notebooks unformatted notebook expression (this
independent of the file and any changes to it that are saved will not affect
the file)



Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565



"Lou Pecora" <pecora at zoltar.nrl.navy.mil> wrote in message
news:831gnl$dak at smc.vnet.net...
> I am unsuccessful in reading in a Notebook and automatically evaluating
> its cells.  The Mathematica book makes it sound simple, but it doesn't
> work.  What am I doing wrong?
>
> E.g. I have a notebook ("mynbook.nb", say)  with one line:
>
> xx=2;
>
> This is a normal cell.  Then when running a session in another notebook I
> use Get to read it in:
>
> Get["mynbook.nb"]
>
> This returns lines of text about notebook stuff and shows the assignment
> xx=2 in the midst of all that.  But when I type
>
> xx  (enter)
>
> I just get xx back, not 2.  Looks like Mathematica finds the Notebook but
> does not evaluate the cells.  How can I do this?  Thanks for any help.
>
> Lou Pecora,  email:  pecora at anvil.nrl.navy.mil
> Naval Research Laboratory, Washington, D.C. 20375-5000, U.S.A.
>  == My comments are my own and do not reflect the views of the U.S. Navy.
==
>  == No Spamming or solicitations -- both are illegal at this site ==
> --------------------------------------------------------------------
> Check out our Nonlinear Dynamics Web site: http://chaos-mac.nrl.navy.mil/
> --------------------------------------------------------------------
>   * The 5th Experimental Chaos Conference Orlando FL June 1999.
> Check it out at  http://www.physics.gatech.edu/ecc5/
>   * The 4th Experimental Chaos Conference Sessions & Abstracts Online:
http://natasha.umsl.edu/Exp_Chaos4, proceedings available.
> --------------------------------------------------------------------
>



  • Prev by Date: Re: calculus with Grassmann variables
  • Next by Date: Re: help - saving an eps file for latex
  • Previous by thread: Re: How to: Read Notebook and auto-evaluate ?
  • Next by thread: Re: the new @@@ thing, MapApply?