5 Respuestas
+ 9
You could use the mkdir method of the OS module.
https://thispointer.com/how-to-create-a-directory-in-JUMP_LINK__&&__python__&&__JUMP_LINK/
+ 7
Check if the folder already exists, the path is correct and if you have permissions for it.
+ 7
Are you using an Android Python IDE app like Pydroid3? It won't work on the SoloLearn code playground because it will try to make the directory on the SL server.
I ran this on Pydroid3 and it created the directory (in the Pydroid files path)
import os
os.mkdir("tempDir")
0
no I've already it 😐, showing error: Errno 13
0
I'm trying to make a save folder for a game I'm making. I'd like to create a folder outside of pydroid, in the user folder, to be able to save player stats and map position. (I've tried JSON but that converts my integers to strings and then my game crashes)