Scripton

Screenshot of Scripton Python IDE

A New Kind of Python IDE

OS
macOS
CPU
Apple Silicon
Intel

Version 1.2.0 — Release Notes

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

Plot generated in Scripton using Plotly
Plot generated in Scripton using Observable Plot

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 strange attractor rendered using Scripton's Canvas API
↑ A de Jong attractor rendered using Scripton's canvas API. Comprising a million draw_circle calls — one for each point.
RANSAC estimation visualized using Scripton
↑ 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 code above produces the image below The image rendered by the code snippet

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

Multiple cursors in the Python REPL
↑ Multi-line editing with multiple cursors.
Folding outputs in the Python REPL
↑ Folding outputs.
Rich Python exceptions in the REPL
↑ 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

Setting breakpoints in Scripton
↑ Easy set breakpoints by clicking next to line numbers.
The debug toolbar
↑ Use the debug toolbar (or keyboard shortcuts) to step through code.
Callstack when paused in the debugger
↑ 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

Plot generated using Seaborn, visualized within Scripton
↑ Matplotlib/Seaborn plots.
Symbol explorer displaying useful information for Python variables
↑ 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

AI features using GitHub Copilot

AI features in Scripton are powered by GitHub Copilot

GitHub Copilot support is built into Scripton. You can use your existing GitHub Copilot subscription (including the free plan) to enable the AI features described below.

AI Code Completion

AI powered code completion in the editor
↑ Context aware AI code completion in the editor.
AI powered code completion in the REPL
↑ AI code completion also works in the REPL and is capable of using context from previous inputs.

Scripton supports AI powered code completion in the editor as well as the REPL.

The REPL code completion is context aware and capable of taking advantage of past inputs to provide completion suggestions.

AI Code Generation

Directly generate code from within the editor.

The surrounding code is automatically used for context, like the auto-inferred DataFrame column names in the example below.

Pair it with Scripton's REPL and visualization tools to rapidly test, iterate, and refine the generated code.

AI Chat

Chat with an AI right from the IDE.

Easily include sources from your workspace as additional context.

Run examples with a single click —

Your conversations are saved privately and locally on your device for easy future reference.

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.8 or newer is required. Scripton supports a wide range of existing Python environment managers.

Contact

You can reach us at contact@scripton.dev