• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Mathematica's kernel in Terminal
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Dropin'
  • Next by Date: Re: Get all the ranges of a Excel spreadsheet
  • Previous by thread: BUG: Mail.app bugs
  • Next by thread: Adding an attachment to Mail.app
  • Index(es):
    • Date
    • Thread