The circup example
command can be used to load the example scripts from any library in a bundle onto the connected device.
$ circup example --help Usage: circup example [OPTIONS] EXAMPLES... Copy named example(s) from a bundle onto the device. Multiple examples can be installed at once by providing more than one example name, each separated by a space. Options: --overwrite Overwrite the file if it exists. --help Show this message and exit.
Options Details
There are only 2 options available for the example command. --help
which prints the built-in documentation information.
The --overwrite
option will direct the command to overwrite the existing copy of the example script on the device if one exists. Without this flag the command will output an error if it finds an existing example already on the device. If you modify example scripts be careful to backup any modified copies of examples on your device if you do use the --overwrite
command.
Examples Arguments
The final part of the command is a single or space separated list of examples to copy to the connected device. The examples must be in the form of lib_shortname/example_name
e.g. neopixel/neopixel_simpletest
or logging/logging_simpletest
.
Tab Completion
The examples argument supports tab completion to autocomplete valid library and example names. So if you enter a partial library short name it will either autocomplete fully if there is only a single valid match, or autocomplete as much as it can if there are multiple possible matches based on the partial entry.
$ circup example req[Tab] # auto completes to: $ circup example requests/ $ circup example neopixel/neopixel_s[Tab] # auto completes to: $ circup example neopixel/neopixel_simpletest
If you press the [Tab] key twice it will print out the list of possible matches based upon the current partial value entered.
$ circup example neopixel/[Tab] # auto completes to: $ circup example neopixel/neopixel_ # press [Tab] twice more neopixel/neopixel_pixel neopixel/neopixel_rpi_simpletest neopixel/neopixel_rainbowio_simpletest neopixel/neopixel_simpletest
$ circup example neopixel/neopixel_simpletest $ circup --host 192.168.1.188 --password Passw0rd example display-shapes/display_shapes_simpletest $ circup example display-shapes/display_shapes_simpletest display-shapes/display_shapes_circle_animation
$ circup example neopixel/neopixel_simpletest Found device at /media/myusername/CIRCUITPY, running CircuitPython 9.0.5. Copying: neopixel_simpletest.py
Text editor powered by tinymce.