Re: Notebook -> Kernel
- To: mathgroup at smc.vnet.net
- Subject: [mg15927] Re: Notebook -> Kernel
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 17 Feb 1999 23:33:58 -0500
- Organization: Universitaet Leipzig
- References: <7a2bb7$1ta@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello Andre,
no solution.
The notebook contains no Mathematica commands it contains the markup
for the document ! So the input
x={1,2,3}
is in Cell[] like
Cell[
RowBox[{"x","=","{","1","2","3","}"}]
,"Input"]
You may read the Notebook with
nb= <<test.nb
and use nb /. Cell[expr_,"Input",___] :> ToExpression[expr] to evaluate
the contents
of the input cells but result will not be a evaluated notebook !
The usual way is to write a plain text file with the
Mathematica commands and write a log file os the session. Several
log-file packages are on MathSource and Roman M"ader has two (one for
automatic Notebook creation) in the third edition of "Programming in
Mathematica".
Hope that helps
Jens
Andre Fachat wrote:
>
> Hi!
>
> I am trying to save a Mathematica 3 Notebook to use it directly with the
> kernel (the notebook reads a file with parameters and writes the output
> to another file and I want to automize this).
>
> However nothing I tried works. The best I got was to save the notebook
> as text and pipe it to the kernel. Some commands get evaluated but for
> others that work fine from the Notebook Frontend produce lots of error
> messages.
>
> Platform is Linux/X11.
>
> Any ideas?
>