10

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?

Alexey Popkov
  • 61,809
  • 7
  • 149
  • 368
ibeatty
  • 2,533
  • 11
  • 22

1 Answers1

12

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...

Itai Seggev
  • 14,113
  • 60
  • 84
  • 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. – ibeatty Oct 15 '19 at 19:50