({{, (RefLink[ExternalObject, paclet:ref/ExternalObject])[…] 
represents an external object inside an (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject]).}})

OpenersNotesSection(Spacer1)Details

(RefLink[ExternalObject, paclet:ref/ExternalObject])[…] can be returned by some external evaluator systems when used with (RefLink[ExternalEvaluate, paclet:ref/ExternalEvaluate]).

An (RefLink[ExternalObject, paclet:ref/ExternalObject])[…] is specific to a particular (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject]), which may not be persistent.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Start a new Python session:

session=StartExternalSession["Python"]

Display the Python max function as an (RefLink[ExternalObject, paclet:ref/ExternalObject]):

ExternalEvaluate[session,"max"]

Start a new NodeJS session:

session=StartExternalSession["NodeJS"]

Display a function in NodeJS:

Last@ExternalEvaluate[session,{"function f() {}","f"}]

OpenersExampleSection1(Spacer1)Scope  (1)

The keys displayed for functions in Python differ between a built-in function and a user-defined function:

py=StartExternalSession["Python"]

Define a function in Python and display it:

ExternalEvaluate[py,"def myfunc(x): return x"];
ExternalEvaluate[py,"myfunc"]

Display a built-in function in Python:

ExternalEvaluate[py,"max"]

Delete the session:

DeleteObject[py]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[ExternalEvaluate, paclet:ref/ExternalEvaluate])  ▪  (RefLink[ExternalSessionObject, paclet:ref/ExternalSessionObject])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[External Interpreted Language Interfaces, paclet:guide/ExternalInterpretedLanguageInterfaces])}})}})