Replacing timer in bash with timer writed in python