Release Notes
v1.3.0
22 May 2025
Light Mode
The new light mode theme has been carefully designed and tuned for each component of the IDE (UI, Editor, REPL, plots, …). You can switch to it from Settings > General.
Code Sections
This new feature allows partitioning your script into independently executable regions (similar to notebook cells) using regular Python comments (starting with the prefix
#:
). These sections can be quickly executed using theSHIFT
+ENTER
keyboard shortcut. Unlike regular execution (⌘
+R
), these code section executions do not auto-restart the Python process, and thus can reuse state from prior executions. Debugging features like breakpoints work as expected.The new Variable Scope feature shows useful information when hovering over variables.
It works while hovering over variables in the editor during debugging —
As well as in the Symbol Explorer —
Inline Variable Descriptions
The editor now displays inline variable descriptions during debugging. Similar to the Symbol Explorer, these values are specialized for many third-party Python libraries. For instance, for PyTorch tensor instances, the description shows its
shape
,dtype
, anddevice
.The Symbol Explorer now allows drilling down into variables to inspect object members.
Updated variables are now highlighted in the symbol explorer
Debugger: Run to Cursor
While debugging, you can now quickly continue until a given line using the new Run to Cursor button (shown while hovering over lines during debugging).
Debugger: Step Out
The debugger now supports a new
Step Out
operation:Canvas Pointer and Keyboard Events API
Canvas
instances can now specify Python callbacks to be invoked on pointer and keyboard events. For instance, theon_hover
callback is invoked when the mouse pointer moves over the canvas instance in the IDE.from scripton.canvas import Canvas canvas = Canvas(width=640, height=480) canvas.on_hover = lambda event: canvas.draw_circle( x=event.x, y=event.y, radius=5, fill='rgba(61, 121, 255, 0.7)' ) canvas.interact()Canvas Synchronization API
You can now use a canvas synchronization block (
with canvas.sync(): ...
) to ensure all nested drawing operations are displayed at once. Internally, Scripton automatically takes care of details like rendering to an offscreen buffer until presentation.from scripton.canvas import Canvas from time import sleep canvas = Canvas(width=640, height=480) # Without the sync, the first circle would appear immediately # while the second one would appear after a 1 second delay. # With the sync below, both circles appear simultaneously after # a 1 second delay (on exiting the with block). with canvas.sync(): canvas.draw_circle(x=100, y=100, radius=100, fill='red') sleep(1) canvas.draw_circle(x=300, y=300, radius=50, fill='blue')Canvas Image Drawing API
You can now draw images (either PIL image objects or
uint8
NumPy arrays representing RGB(A) images) onto canvas instances using the newdraw_image
method. A new helper class method (Canvas.from_image
) also allows easily creating a canvas initialized with an image.from scripton.canvas import Canvas from PIL import Image canvas = Canvas(width=640, height=480) canvas.draw_image( image=Image.open('overlay.png'), opacity=0.5 )Canvas Matrix Rendering API
You can now render colormapped NumPy and PyTorch matrices directly onto a canvas image using the new
draw_matrix
method. Additionally, the newCanvas.from_matrix
class method provides a convenient way to create a canvas pre-initialized with a colormapped matrix.from scripton.canvas import Canvas import numpy as np x = np.arange(100) matrix = np.abs(x[:, None] - x) canvas = Canvas(width=640, height=480) canvas.draw_matrix( matrix, colormap='Magma', x=270, y=190, )Many refinements and bug fixes
Tinytron tweaks, improved built-in typography variants, unified file and folder opening, fixes for rendering issues on older Intel Macs...
v1.2.0
26 March 2025
AI Chat
A new AI chat feature is now available in Scripton. It requires a GitHub Copilot subscription (the free plan is supported).
To display the chat tab, you can use either its shortcut (
⌘
+ctrl
+I
), the command palette (search "ai chat"), or this toolbar button —AI Code Completion
Once you log in to GitHub Copilot within Scripton (either via the AI Chat tab, or Settings > AI), AI code completion will automatically start working in the editor —
AI code completion is also available in the REPL, where it can automatically incorporate context from past inputs to provide completion suggestions —
AI Code Generation
You can also directly generate code from within the editor. You can bring up the inline code generation prompt using its editor shortcut (
⌘
+I
) —Tip: You can switch the code generation model by clicking on the gear icon.
Auto Recall Run Arguments
Starting with this release, Scripton will automatically remember the last used arguments for each target —
/run analysis --data nyc_v2.csv --output /data/resultsand automatically use them when the same target is re-run (eg: via the toolbar or
⌘
+R
).This release also introduces the special alias
:
for the current target, which can be used like so:/run : <any arguments go here>Memory Optimizations
Reduced memory usage, especially for the case where a large number of files are open.
v1.1.0
16 February 2025
New command palette modes
This version adds a couple of new command palette modes. The first allows quickly searching through symbols in the active document (
⌘
+shift
+O
) —You can also search for symbols across the entire workspace (
⌘
+T
) —There are a couple ways to switch between these modes (in addition to their usual keyboard shortcuts). The first is using common prefixes you may already be familiar with from other editors (like
>
for commands,:
to jump to a line, and so on).You can also use the new menu at the bottom —
Add custom Python environments and interpreters by path.
By default, Scripton auto-detects Python interpreters and environments on your machine (like those installed using Conda and Homebrew). However, what if you want to use a custom environment/interpreter that's not automatically discoverable? For instance, you may have a folder containing a custom virtual env that's not a part of your the open workspace. Or you may have an isolated Python binary.
Starting this version, you can simply enter the path to any Python binary/environment and Scripton will auto-detect and persist it in its list of environments.
Run as Python Module
It's now possible to get the same behavior as
python -m
. Scripton will now auto-detect when the active execution target is part of a Python package (based on the presence on__init__.py
and__main__.py
files) —In addition, the
/run
special command has been extended to support a new syntax for Run as Module:/run module:[optional workspace relative path]<module name>For instance, this is equivalent to executing
python -m foo.bar
when the packagefoo
is in the currently open workspace's top-level:/run module:foo.barIf, instead, the package was located under the
src
sub-directory:/run module:src/foo.barThe editor and REPL text can now be zoomed in and out.
⌘
++
(zoom in),⌘
+-
(zoom out),⌘
+0
(reset)Improved on-type formatting
- The cursor is now correctly positioned when pressing enter after hanging indents.
- Triple-quotes are now auto-closed.
- Auto outdent after
return
,raise
,pass
,break
- Auto outdent on
:
forelse
,elif
,catch
,finally
Improved dictionary key auto-completion