Thread: Data Files
View Single Post
  #1  
Old 03-23-2006, 11:08 AM
betancourtb82 betancourtb82 is offline
Member
 
Join Date: Jan 2006
Posts: 103
Data Files

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
Reply With Quote