I’m writing a Python script within which I sometimes change directories with os.chdir(IMG_FOLDER) in order to do my file operations. That works fine as long as I have one thread only (as I can go back where I came from before leaving the function). Now, in case of multi threading, I would require a seperate “os path” instance for each thread otherwise it might mess up my file operations, hey?
How do I best go about this?
I’m writing a Python script within which I sometimes change directories with os.chdir(IMG_FOLDER) in
Share
The ultimate solution to this problem was that I
.tmpe.g. and only once the write process is completely finished, it’ll be renamed to the name, that I’m scanning for in the seperate thread.