LumericalPersistentPythonSession#
- class ansys.lumerical.mcp.persistent_session.LumericalPersistentPythonSession(python_executable: str | None = None, startup_code: str | None = None, working_directory: str | None = None)#
Bases:
ansys.common.mcp.helpers.PersistentPythonSessionA
PersistentPythonSessionthat tolerates long, silent operations.execute()blocks indefinitely on a per-call completion marker; hung calls are recovered out-of-band by therestart_sessionMCP tool, which invokesPersistentPythonSession.restart().
Overview#
Execute Python code in the persistent session. |
Import detail#
from ansys.lumerical.mcp.persistent_session import LumericalPersistentPythonSession