ExternalSessionObject

ExternalSessionObject[]

represents an external session started by StartExternalSession for use with ExternalEvaluate.

Details

  • ExternalSessionObject[][prop] returns a property of the external session.
  • The following possible properties can be used:
  • "System"the evaluator system for this session
    "Version"the version of the system
    "Executable"the name of the executable to run to start scripts with
    "ReturnType"type of object to return ("String", "Expression", ...)
    "Prolog"code to run before commands evaluated with this session
    "Epilog"code to run after commands evaluated with this session
    "EvaluationCount"the number of evaluations run with this session
    "SessionTime"the number of seconds elapsed since this session started
  • Available properties can be queried with ExternalSessionObject[]["Properties"].

Examples

open allclose all

Basic Examples  (2)

Start an external session to get an ExternalSessionObject:

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

Delete the external session with DeleteObject:

In[2]:=
Click for copyable input

Query properties from an ExternalSessionObject:

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

Delete the session object:

In[3]:=
Click for copyable input

Scope  (2)

Properties & Relations  (1)

See Also

ExternalSessions  StartExternalSession  ExternalEvaluate  FindExternalEvaluators

Tutorials

Introduced in 2017
(11.2)