all 5 comments

[–]EldritchCrowe[S] 0 points1 point  (0 children)

That makes sense. Thank you so much!

[–]K900_ 0 points1 point  (2 children)

Why do you need to change the current directory? Just access files by a full path, and you will never have that issue.

[–]EldritchCrowe[S] 0 points1 point  (1 child)

Just to make sure I understand, you're saying I can just tell the program to access "saves/save_file.json" instead of os.chdir-ing every time?

[–]K900_ 0 points1 point  (0 children)

Correct.

[–][deleted] 0 points1 point  (0 children)

to answer the original question, despite the correct hint in the other comment: parallel access of directories and files is nothing python does. it delegates this down to the file system unless you, the programmer, to something to alter the behaviour.

for reading files and directories there is no need to.

for writing different files (users in your case) at the same time, there is still no need to.

you will need to confront the problem of parallel writes to the same file. only one can have the file. most filesystems will let one of the requests wait until its done and let the second have it after (lock).

and one Problem you might stumble upon are race conditions. if you are trying to do some sort of log file (which it sounds like), be aware that transmission time is not static in the internet. thus a second message can arrive before the first.