How to set python to move the file after complete writing in the server ?
Below is my same to lock the file after complete writing, but it does'nt work in Linux server.
try:
fcntl.lockf(file2,fcntl.LOCK_EX|fcntl.LOCK_NB)
print "Yes Locked"
time.sleep(20)
except:
print "No Lock"
file.close()
Any right suggestion ? Thank You