A python ping function that works on both Windows and Mac/Linux
The original post on stackoverflow mentioned that the Mac option in the solution was not tested. I have tested and found that the wait timeout flag should have been 'W' instead of 'w'. My edit was pending review and might not be visible publicly as of time of this writing.
Cheng Guan 23 Nov 2020.