F
fowlertrainer
Hello python-list,
On windows I try with this:
import os
f1=file('a',"w+",os.O_EXCL|os.O_WRONLY)
f1.write("0")
f2=file('a',"w+",os.O_EXCL|os.O_WRONLY)
f2.write("1")
f1.close()
f2.close()
But it is not working...
So how to I lock this file to prevent from next opening ?
Thanx.
On windows I try with this:
import os
f1=file('a',"w+",os.O_EXCL|os.O_WRONLY)
f1.write("0")
f2=file('a',"w+",os.O_EXCL|os.O_WRONLY)
f2.write("1")
f1.close()
f2.close()
But it is not working...
So how to I lock this file to prevent from next opening ?
Thanx.