UNIX ed writted in python