Yeah - Python is superior for this. Implementing the equivalent in c++ would either pull in extra dependencies or be very OS-specific.