🧪 Version 0.2.2 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 get_file_save_location

Get the location or filename to save. This is part of the reference section.

Purpose

Get a file save location with a callback. Note that some platforms require an active draw loop with a call to clear.

Snippet

Ask for a file save location with a callback that prints the selected filename.
sketch.get_dialog_layer().get_file_save_location(lambda filename: print(filename))

Parameters

  • callback: Callback invoked if the user selects a file location, passing a single string with the filename.

Availability

Available for Sketch2DWeb and Sketch2DApp. For Web, uses a simple prompt.

See also