Raspberry Pi: Syncing Issue when appending datafiles


MechE

Recommended Posts

My Objective: Put a constantly updating file into the Resilio Sync folder.

Problem: When I run my code, the updating file appears in the raspberry pi synced folder; however, 
it does not sync to my other computers unless the python code is no longer running.

I've found that the following code syncs perfectly with Resilio:
 
 #Send IP Address Information to the Folder
  f = open("/home/pi/Desktop/folder/Data/ipAddress.txt","w+")
  f.write(str(ipPrint))
  f.close() 

The files that don't sync are the ones that are appended ,"a+":
for port in activeports:
		files[index] = open("/home/pi/Desktop/folder/Data/" + "20" + filedate.strftime('%y_%m_%d_') + str(devices[index]) + ".csv","a+") 

Do you guys have any idea on what's happening? 
Thanks in advance!

 

 

Link to post
Share on other sites
On 8/13/2017 at 6:00 AM, MechE said:

I've found that the following code syncs perfectly with Resilio:  
#Send IP Address Information to the Folder f = open("/home/pi/Desktop/folder/Data/ipAddress.txt","w+") f.write(str(ipPrint)) f.close()

is it the file name or its content? 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.