IDE Features


The layout and the features are continuously improving.

1. Opening the Python Code panel

Enable Developer mode first (main menu ☰ → Settings → Developer mode), otherwise the Python entry does not show up under Tools.

Tools menu with Python entry

Open the main menu (☰) → Tools → Python, then pick one of:

Python submenu

  • Convert Session to Python – turns the current analysis session into an equivalent Python script (an xplain.Xsession().run({...}) call built from the session’s method calls), shown as a JSON tree with a Preview and Download button.

    Transform current Session to Python Script

  • Create Jupyter Notebook – opens the Python Code panel described below, docked to the right of the analysis.

  • Start Jupyterlite – opens JupyterLite in a new browser tab (see Start JupyterLite from XOE).

2. Python Code panel

Python Code panel with the File menu open

The panel is docked on the right-hand side of the window (collapse/expand it with the vertical Python Code tab at the right edge) and has:

  1. File menu: Load script, Save script, Save script as, New script.

  2. Execute script: runs the current code.

  3. pip install: install packages by entering the package names separated by commas, for example: xplain, pandas, streamlit.

  4. Options: multiple options can be set in the input field, separated by spaces. Options syntax: --<option_name>=option_value.

  5. Code area: the Python code can be edited and viewed there.

    Comments written in a Python comment block such as '''description in the comment block''' are shown to users who open an existing script, independent of the admin role (see Role-Based-Access-Control (RBAC)).

  6. Output area: shown below the code area; the script’s plain-text output is displayed there. If the script prints a full HTML document instead (for example a Plotly figure’s fig.to_html(full_html=True, ...)), a separate Python output window opens and renders that HTML instead of printing it as text — see Render a chart with Plotly.

Load script opens a file browser scoped to the current Team (Private Area / Public Area / a named team) with two tabs:

Open .py File dialog

  • …on Server – scripts saved on the Xplain server, listed with file name and last-updated time.

  • …on your Computer – scripts loaded from your local filesystem.

3. Server-side Python

If the backend is started with the application property xplain.serverside.python=true, admin users additionally see a serverside checkbox in the panel. By default this checkbox does not appear and the Pyodide WebAssembly runtime is used instead. See Server-side Python for details.