ping.py from the py2/master branch