python script to read files and parse their content