To elaborate, I need the script to check whether the system is connected to wifi ( using infinite busy wait loop) and once it connects, the script resumes to do whatever it wants to do next..
This works but as you can see, it wastes CPU time (it usually takes about 5-8 seconds to connect to wifi) .. now, might add a timer to only check at regular intervals, but is there a way to just 'pause' the script and 'signal'/'resume' it till the wifi is connected
PS: To check whether wifi is connected or not, I'm using
hostname -I
in Python script which returns a value if connected and null otherwise.