Hello is there anyway i can open a file with excel while is python programm is running? When i open it, it always has no data in it. Only if the Programm finishes Data is in the CSV. So is there a way that the csv writers writes data instantly and not only after the programm finishes?
This is how i open the file
filename = "Messung_von_" + datetime.datetime.now().strftime("%Y_%m_%d-%H_%M_%S")
file=open (filename+ ".csv", "wb")
c = csv.writer(file) #CSV
then in a for loop im writing this to the file
c.writerow([x_in_plot,y_in_plot,get_noise()])
The X and Y Values are counted in the for loop, the function get_noise() is a function where i just read a value out of a device
after the for loop i close the csv with
file.close()
thanks