🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for on_quit

Specify callback for when the sketch ends execution. This is part of the reference section.

Purpose

Register a callback for when the sketch terminates.

Snippet

Register a callback for end of sketch execution. This function should expect a single parameter which is the sketch quitting.
def callback(sketch_quitting):
print('Quiting')
sketch.on_quit(callback)

Parameters

  • callback: The function to invoke when the sketch stops execution.

Availability

Available for Sketch2DApp and Sketch2DWeb. Note that, on web, only called if quit is explicitly invoked.

See also