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

Read a text file. This is part of the reference section.

Purpose

Read a text file either from local file system or the network.

Snippet

Load the text file called example.txt.
records = sketch.get_data_layer().get_text('example.txt')

Parameters

  • path: The location at which the file can be found.

Examples

Availability

Available for all platforms. On static and app renderers, will interpret path as a local file path using the operating system's conventions. For web, it will interpret path as a URL. Filenames like "example.txt" will assume the same directory. All platforms support remote files if prefixed by "http:// or https://".

See also