Description of what you are sharing
I've recently started using uv
from Astral. Here's a clever use case:
uvx --with 'pyobjc-framework-CoreWLAN' python@3.13 -c \
"from CoreWLAN import CWInterface; print(CWInterface.interface().lastNetworkJoined().isPersonalHotspot())"
This will spin up a throw-away virtual environment using Python 3.13 with the pyobjc-framework-CoreWLAN
package installed. The Python code prints True
if the SSID I'm connected to is from a mobile Hotspot, and False
if not. Now I can dynamically update the icon in a custom built WiFi status menu bar item.
I find this quite helpful and clever, so I thought I'd share.