files and streaming data in python