in an effort to update the Grid Studies series, i went through the Python study files to reflect changes / deprecations for Python 3.11 (these were last updated/written for 3.5), as well as to anticipate new questions about scripting techniques based on expectations from norns.
namely:
if the grid is disconnected during a script's run, the 'action' of the script should continue without error
variables managed by the grid should persist if the grid connection is lost (like when changing applications or hot-swapping to another device)
i also wanted to demonstrate scripting that adapts to the size of the connected grid, by avoiding hard-coding stuff like 'row 7 displays triggers' in favor of 'the second-to-last row displays triggers'.
i'm absolutely a Python novice, so hopefully the text presents the pedagogical intent of the changes, towards which i'd love your feedback / suggestions for alternative methods of achieving the same results in clearer code!
@tehn , artem rounded out the Python study code with some incredible insights + suggestions -- i've mirrored those into this proposed doc update, ready for review!
cross-posting from https://github.com/monome/grid-studies-python/pull/11 to gather additional feedback on the study text!
in an effort to update the Grid Studies series, i went through the Python study files to reflect changes / deprecations for Python 3.11 (these were last updated/written for 3.5), as well as to anticipate new questions about scripting techniques based on expectations from norns. namely:
i also wanted to demonstrate scripting that adapts to the size of the connected grid, by avoiding hard-coding stuff like 'row 7 displays triggers' in favor of 'the second-to-last row displays triggers'.
i'm absolutely a Python novice, so hopefully the text presents the pedagogical intent of the changes, towards which i'd love your feedback / suggestions for alternative methods of achieving the same results in clearer code!
tytyty! <333