python tail log parser