pylsl
pylsl copied to clipboard
Use Enum classes for the channel value formats and post processing flags
Use Python's Enum class to group the channel value formats and post processing flags.
Doing this groups the two sets of variables into semantically meaningful classes and now the attributes within are commented in a way to show up in IntelliSense. By also grouping this way, the cf_
and proc_
prefixes can be removed to aid in readability.
Code changes:
- Create Enum classes
- Remove comments from original variables and place them under the "Compatibility Interface for old pylsl API" section
- Update examples to use enum classes
- Update examples to no longer use the aliased
resolve_stream()
function and instead replace withresolve_byprop()
where appropriate