🧪 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 get_file_load_location

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

Purpose

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

Snippet

Ask for a file load location with a callback that prints the selected filename.
sketch.get_dialog_layer().get_file_load_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