Better implementation for echo.py
Should work with python 2.7 now.