[visionegg] Re: how to output the result to a file
- From: Eamon Caddigan <ecaddiga@xxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx, Lili Wu <wull1982@xxxxxxxxxxxx>
- Date: Wed, 21 Nov 2007 19:20:58 -0600
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
- Follow-Ups:
- [visionegg] Re: how to output the result to a file
- From: Neil Halelamien
- References:
- [visionegg] how to output the result to a file
- From: Lili Wu
Other related posts:
- » [visionegg] how to output the result to a file
- » [visionegg] Re: how to output the result to a file
- » [visionegg] Re: how to output the result to a file
- » [visionegg] Re: how to output the result to a file
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 雅虎邮箱,终生伙伴!
- [visionegg] Re: how to output the result to a file
- From: Neil Halelamien
- [visionegg] how to output the result to a file
- From: Lili Wu