8
$\begingroup$

Something weird just happened to me: I mis-typed a keyboard shortcut, hitting the wrong keys, and a new notebook opened up with a Python prompt! Just for grins, I tried entering some simple Python code into the cell and evaluating it, and sure enough, it produced correct output.

enter image description here

The little python-logo box to the left of the input box, if clicked, produces a drop-down menu that lets me choose Python or NodeJS.

I've done some googling, and discovered that Mathematica has a new experimental "external evaluation system". Cool! However, I have been unable to figure out what keystroke I hit that made this little gem appear. All the Mathematica docs say is that one can use the relatively clumsy ExternalEvaluate["Python",code] expression.

Does anyone know how to produce this special input cell?

$\endgroup$
  • 1
    $\begingroup$ Type > at the start of an input cell $\endgroup$ – Carl Woll Oct 15 '19 at 2:15
10
$\begingroup$

Type > at the start of a cell (or when between cells). This is documented in an example on ref/ExternalEvaluate (last Basic Example). I'm a bit suprised it's not in the details section. It probably should be...

| improve this answer | |
$\endgroup$
  • $\begingroup$ Argh. I guess I should have scrubbed through the examples more carefully… I assumed to quickly that because it is an "experimental" feature, the keyboard shortcut would be undocumented. $\endgroup$ – ibeatty Oct 15 '19 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.