gives the list of currently active external evaluator sessions.
ExternalSessions[sys]
gives the list of sessions associated with the system sys.
ExternalSessions
Listing of External Evaluators »gives the list of currently active external evaluator sessions.
ExternalSessions[sys]
gives the list of sessions associated with the system sys.
Details
- ExternalSessions returns an ExternalSessionObject for each active session.
- DeleteObject kills an external session.
- In ExternalSessions[sys], possible choices of sys include:
-
"Python" Python "NodeJS" JavaScript running through Node.js "Julia" Julia "Ruby" Ruby "R" R "Shell" Bash, Sh, Zsh, ... "Jupyter" Jupyter kernel "SQL" SQL database "SQL-JDBC" SQL database using JDBC
Examples
open all close allBasic Examples (3)
Start a session and see it listed with ExternalSessions:
session = StartExternalSession["NodeJS"];
ExternalSessions[]DeleteObject[session]Now the session is not present in ExternalSessions:
ExternalSessions[]Start sessions and list them independently by specifying the system:
py = StartExternalSession["Python"]
js = StartExternalSession["NodeJS"]ExternalSessions[sys] only shows sessions for that system:
#["System"]& /@ ExternalSessions["Python"]#["System"]& /@ ExternalSessions["NodeJS"]DeleteObject[{py, js}]Start some sessions and delete all of them with DeleteObject and ExternalSessions:
sessions = Table[StartExternalSession["Python"], $ProcessorCount]DeleteObject works with a list of more than one ExternalSessionObject:
DeleteObject[sessions]Scope (1)
Sessions are automatically removed from ExternalSessions once they are deleted:
session = StartExternalSession["NodeJS"];
MemberQ[session]@ExternalSessions[]DeleteObject[session];
MemberQ[session]@ExternalSessions[]Neat Examples (1)
Start sessions to list all their properties:
Table[StartExternalSession[RandomChoice[{"Python", "NodeJS"}]], $ProcessorCount];Make a dataset of the various properties of all the sessions:
Dataset[Function[{session}, AssociationMap[session, session["Properties"]]] /@ ExternalSessions[]]Related Guides
Related Workflows
Text
Wolfram Research (2017), ExternalSessions, Wolfram Language function, https://reference.wolfram.com/language/ref/ExternalSessions.html (updated 2020).
CMS
Wolfram Language. 2017. "ExternalSessions." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/ExternalSessions.html.
APA
Wolfram Language. (2017). ExternalSessions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExternalSessions.html
BibTeX
@misc{reference.wolfram_2026_externalsessions, author="Wolfram Research", title="{ExternalSessions}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ExternalSessions.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_externalsessions, organization={Wolfram Research}, title={ExternalSessions}, year={2020}, url={https://reference.wolfram.com/language/ref/ExternalSessions.html}, note=[Accessed: 12-June-2026]}