ftxt.flush()- nothing has changed.
os.fsync(ftxt.fileno())- in file has data, but not all. Put a delay of 5 seconds - the amount of recorded data has not changed.
txt = open(name,"w",0)- python error
ValueError("can't have unbuffered text I/O"). It was said that because of the Unicode in python3 to open the file without a buffer impossible.
print(name,file=ftxt,flush=True)- did not help!
ftxt = open(name, 'w') ftxt.write(strg) ftxt.flush() os.fsync(ftxt.fileno()) import time time.sleep(5) ftxt.close import socket PORT = 33333 IP = "192.168.3.116" sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) msg = "User::Git.load_in \"" + name + "\"" sock.sendto(msg.encode('utf-8'), (IP, PORT)) sock.close
# -*- coding: utf-8 -*-
Find more questions by tags Python