I am trying to create a pre-build script in a python file.
I import the env using Import(“env”) as specified in the documentation, however I would like to assign a variable in python to the name of the currently selected environment.
Example:
platformio.ini:
[env:pico]
platform = …
python:
Import(“env”)
print(env.)
I would like the script to be printing “pico”
How do I go about accessing this name from my pre-build script?