Mathematica's kernel in Terminal
Mathematica's kernel in Terminal
- Subject: Mathematica's kernel in Terminal
- From: Philippe GRUCHET <email@hidden>
- Date: Fri, 18 Apr 2003 07:16:29 +0200
Greetings!
The AS script below controls the Mathematica's kernel (4.2) in a
Terminal shell window tcsh (ttyp 1):
-------------------------------------------
tell application "Terminal" to do script "
'/Applications/Maths/Mathematica 4.2.app/Contents/MacOS/MathKernel'
$PreRead := (Print[#];#)&
3*3
Eigenvalues[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}]
Solve[Sqrt[x] + a == 2*x, x]
Exit[]
"
-------------------------------------------
$PreRead := (Print[#];#)&
--> will cause the kernel to echo all of its input back to the terminal.
But the 1st input is always empty and the process begins at input 2:
In[1]:=
In[2]:= 3*3
Out[2]= 9
AppleScript is fast under OSX and (sometimes?) the Terminal seems a bit
slow to respond.
So, does exist a shell command like 'delay' to put after
$PreRead := (Print[#];#)&
in this script?
Thank you very much in advance!
Kind regards,
Philippe/SVM Mac
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.