pure python oop version of ping