Save custom variables to .log file

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v2022.2.3
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?:
Hi to all of you :slight_smile:,
I am building my experiment using the Builder. After reading some data from Excel files, I am using a code component to compute some values which are stored in a list of lists of floats; e.g.:

my_list = [[0.5025, 0.4985, ...], [0.1025, 0.2386, ...], ...]

It would be awesome to add the final list to the log file, so I am able to check whether the computed values are correct, even after the experiment is finished.

I know how to add values to the data a.k.a. .csv file using thisExp.addData(...), and I also plan to store the corresponding values there once I implemented the trial-logic. However, it’d be great to know, if there is a possibility to also store variables to the log file.

Thanks for your help :grinning: