ExternalValue

ExternalValue[sys,"sym"]

gives the value of "sym" in external evaluator sys.

ExternalValue[session,"sym"]

gives the value of "sym" in the specified external session.

Details

  • ExternalValue[session,"sym"] returns a Failure object if "sym" does not exist in session.
  • In ExternalValue[sys, ], possible choices for sys include:
  • "Python"Python
    "Python-NumPy"Python with NumPy loaded
    "Python-PIL"Python with the Python Image Library (PIL) loaded
    "NodeJS"JavaScript running through Node.js

Examples

Basic Examples  (1)

Start an external session:

In[1]:=
Click for copyable input
Out[1]=

Set an external value:

In[2]:=
Click for copyable input

Get the external value:

In[3]:=
Click for copyable input
Out[3]=

End the external session:

In[4]:=
Click for copyable input
Introduced in 2019
(12.0)