[visionegg] Re: how to output the result to a file

Here's a good tutorial on writing things to files (part of a larger good tutorial on python): http://www.diveintopython.org/file_handling/ file_objects.html#d0e15055

Note that writing to (and reading from) disk is a relatively slow operation for a computer. It does its best by buffering output, but if your experiment is sensitive to timing issues, it's typically best to save data in another structure (e.g., a list of coordinate tuples), and only write that info to a file at the end of your trials.

HTH,
Eamon


On Nov 21, 2007, at 7:01 PM, Lili Wu wrote:

Hi,
I have a question about how to output the running result of a program.
Take the demo of mouseTarget.py for example, I can use "print x,y " to output every mouseposition in the Python Shell window. Is there any method to output this data to a file, like a *.txt file?

Thanks!

Lili

雅虎邮箱,终生伙伴!

=====================================The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: