PyGaze - documentation - liblog
The log library is used to create Logfile objects, to create and write data to textfiles (.txt). The resulting logfile contains tab-separated values. Each time the write method is called, a new row will be used to write to.
contents
LogfileLogfile.write
Logfile.close
Logfile
Logfile object for saving data to a text file
arguments | |
---|---|
None | |
keyword arguments | |
filename | name (possibly including path) for the logfile; WITHOUT extension, .txt is added automatically (default = LOGFILE) |
Writes a new row with the given values to the logfile, separating them by a tab
arguments | |
---|---|
vallist | list of values to be written to logfile, e.g. ["trialnr","trialtype","RT"] or [1,"valid",103] |
keyword arguments | |
None | |
returns | |
None | writes each value to the logfile, adding tabs between the values |
Closes logfile (do this after writing everything to the file!)
arguments | |
---|---|
None | |
keyword arguments | |
None | |
returns | |
None | closes logfile; calling write method after calling close method will result in an error! |
full source
You can find the full source code for liblog.py on GitHub.