PsyParse provides code to deal with parsing log files generated by PsychoPy. You may find PsyParse useful for doing things like generating CSV dataframes from the default sequential logfiles generated by PsychoPy.