Scripton

A New Kind of Python IDE

OS
macOS
CPU
Apple Silicon
Intel

Dynamic visualizations are as simple as a loop

for t in range(100):
    plot(
        x=x,
        y=np.cos(x + t / 10)
    )
    time.sleep(0.01)

Visualize in realtime directly from your Python scripts — no notebooks, servers, or browsers required.

Visualizations are displayed in a dedicated tab right within the IDE.

Integrated plotting toolkits

Scripton includes built-in plotting toolkits that expose the capabilities of Plotly and Observable Plot directly to Python.

No installation is necessary — these libraries are automatically available when executing in Scripton.

from scripton.lyra import plot
import numpy as np

# Evenly spaced values between 0 and 2π
x = np.linspace(0, 2 * np.pi)

# Plot sin(x)
plot({'x': x, 'y': np.sin(x)})

For more details, check out the Scripton plotting documentation for Lyra (toolkit for Plotly) and Orion (toolkit for Observable Plot).

Realtime visualizations for science & engineering

Realtime colormapped visualization of 1280×1080 depthmaps (as NumPy matrices) in Scripton.

Scripton's architecture combines high-performance interprocess communication for low latency and high throughput on the backend, while leveraging GPU-accelerated rendering to deliver real-time visualizations.

Visualizing matrices (2D NumPy arrays, PyTorch tensors, …) is as simple as this —

import numpy as np
from scripton import show

x = np.arange(100)
toeplitz = np.abs(x[:, None] - x)

# Show a colormapped version of the matrix
show(toeplitz)

Learn more about visualizing matrices.

Built-in graphics toolkit

↑ A de Jong attractor rendered using Scripton's canvas API. Comprising a million draw_circle calls — one for each point.
↑ RANSAC estimation of a circle from noisy points in the presence of outliers. Each candidate circle is drawn using Scripton's canvas API from directly within the sampling loop, with its color representing its inlier ratio.

The built-in Scripton canvas library provides a fast and powerful 2D raster graphics API.

from scripton.canvas import Canvas

canvas = Canvas(width=290, height=200)

for i in range(10):
    canvas.draw_circle(
        x=100 + 5 * i,
        y=100,
        radius=10 + 10 * i,
        fill='#3D79FF20'
    )

The outputs appear directly in the IDE in realtime in a dedicated tab.

Learn more about Scripton's canvas graphics API.

Rapidly prototype interactivity

The slider controls the maximum depth threshold. Changing the slider re-invokes the render callback shown in the code snippet, which updates the visualizations based on the new state. It also returns the updated user interface, which itself may be dynamic.

Easily add interactivity to your scripts using Scripton's UI toolkit.

from scripton import ui

...

def render(state):
    # Process using current state
    depth, image = mask_using_depth(
        threshold=state.threshold
    )

    # Display results
    show(depth, title='Depth', key='depth')
    show(image, title='Masked Output', key='image')

    def reset():
        state.threshold = 20

    return ui.HStack(
        ui.Button(
            label='Reset',
            on_click=reset
        ),
        ui.Slider(
            label='Depth Threshold',
            value=state.bind.threshold,
            range=(0, 20)
        )
    )

Learn more about the UI toolkit.

A rich REPL by your side

↑ Multi-line editing with multiple cursors.
↑ Folding outputs.
↑ Rich exceptions. Clicking an exception location jumps to it in an editor.

Scripton includes a unique Python REPL that's designed to be a natural extension of your coding environment.

The REPL offers a full-featured editing experience with features like auto-completion, multi-line editing, and multiple cursor support. Outputs can be collapsed to save space, and Python exceptions are syntax-highlighted with clickable navigation to source code. Rich inline outputs are displayed for objects like Pandas data frames and PIL images.

Learn more about the REPL's capabilities.

Frictionless and fast debugging

↑ Easy set breakpoints by clicking next to line numbers.
↑ Use the debug toolbar (or keyboard shortcuts) to step through code.
↑ Navigate the callstack and view the associated variables for each frame. The REPL can be used to evaluate debug code in the context of the selected stack frame.

Debugging in Scripton is simple — set a breakpoint and run. No special configurations necessary.

Learn more about debugging in Scripton.

Built-in support for many third party libraries

↑ Matplotlib/Seaborn plots.
↑ The symbol explorer displays extended information for objects like PyTorch tensors, NumPy arrays, and PIL images.

Scripton includes built in support for many third-party libraries. For instance:

  • Matplotlib (and libraries based on it, like Seaborn) plots appear within the IDE

  • PyTorch tensors display their shape, dtype, and device in the symbol explorer

  • Pandas DataFrames and PIL images display inline previews in the REPL

  • OpenCV imshow calls are displayed inside the IDE

For serious work and fun explorations

An interactive demonstration showing the construction of a Bézier curve by composition of linear interpolation. Built using Scripton's canvas and ui toolkits.

Scripton's designed and engineered to serve a wide range of needs, from research and industrial applications to creative explorations.

System Requirements

Scripton currently requires macOS (Apple Silicon based models and older Intel based models are both supported). Windows and Linux support is planned.

Python 3.7 or newer is required. Scripton supports a wide range of existing Python environment managers.

Contact

You can reach us at contact@scripton.dev