Working with python file that gets packets