expyriment.io.OutputFile

class expyriment.io.OutputFile(suffix, directory, comment_char=None, time_stamp=None)

A class implementing an output file.

Methods

__init__(suffix, directory, comment_char=None, time_stamp=None)

Create an output file.

Filename: {MAINFILE_NAME}_{SUBJECT_ID}_{TIME_STAMP}{suffix}

Parameters :

suffix : str

file suffix/extension (str)

directory : str

create file in given directory

comment_char : str, optional

comment character

time_stamp : bool, optional

using time stamps, based on the experiment start time, not the current time

comment_char

Getter for comment_char

directory

Getter for directory

filename

Getter for filename

fullpath

Getter for fullpath

rename(new_filename)

Renames the output file.

save()

Save file to disk.

standard_file_name

Getter for the standard expyriment outputfile name.

Filename: {MAINFILE_NAME}_{SUBJECT_ID}_{TIME_STAMP}{suffix}

suffix

Getter for directory

write(content)

Write to file.

Parameters :

content : str

content to be written (anything, will be casted to str)

write_comment(comment)

Write a comment line to files.

(i.e., text is proceeded by comment char).

Parameters :

comment : str

comment to be written (anything, will be casted to str)

write_line(content)

Write a text line to files.

Parameters :

content : str

content to be written (anything, will be casted to str)

write_list(list_)

Write a list in a row. Data are separated by a delimiter.

Parameters :

list_ : list

list to be written

Previous topic

expyriment.io.Mouse

Next topic

expyriment.io.ParallelPort

This Page