I'm creating a data file for the program I wrote. Here is the setup. I have an input named subject called by viz.input. Then I say the following in the data file:
Code:
start_time = time.time()
question_data = open('study_data','a')
elapsed_time = time.time() -start_time
data = 'Subject is ' + str(subject)
question_data.write(data)
question_data.flush()
The problem is when I open the data file, it prints out the information in some duplicated way (e.g. with subject number 1). Below is how it is printed. Am I doing something wrong?
Subject is Subject is 1