Susie,
I just started using CSV files myself, so I am not sure I understand what exactly your question is.
Do you mean your problem is with the wide data file your program generates?
Or do you have an analysis file that reads from your psydat file and generates a CSV file?
The latter is what I do, and I don't really have any problems, though I don't use many strings in my output.
But, for example, it happily displays a whole list (say, of RTs) in one comma-separated cell.
I don't have the time to wade through all the code you attached, so if you can separate the critical bits that would make it easier.
Have you tried using triple quotes to delineate whichever string it is that you try to save?
I think if you do that, it should keep commas etc inside it.
Another alternative I guess would be to scan your string for commas and try to strip them out.
But have a look at the psydat file and see what's in there. It might be a better way to get at what you need than the wide data format file anyway.
On Monday, June 10, 2013 3:31:32 PM UTC+1, Susanna Martin wrote:
Hi
I've been trying to write my own experiment in psychopy and so far it's going well! Basically I display a bit of text (called from a spreadsheet) and ask the participants to rate it on two scales, then it clicks onto the next statement.
This all works fine, however my problem is in my CSV output file. It is picking up on the commas in my display text and generating new columns which means my responses are out of sync with each other.
Does anybody have any suggestions for excluding the text commas from the CSV? An alternative is to not report the block of text in the CSV as it reports other data which allows me to deduce which statement, but i'm not sure how to do this either!
I've attached my py file, the excel statements file which it calls and an example response file so you can see what the issue is.
Thanks in advance!
Susie