Yes, this would work, but I have to think about it in terms of the user, so I actually wouldn’t be able to do that, considering an actual user would only copy the contents of src/, I wouldn’t be able to do that (At least I think).
Now, it doesn’t really matter where that store folder gets made, but it is a huge issue when using file_exec() because the other source code is stored within src/. I try to keep my code unreliant on the repository itself, I only use version control as a way to store my code, not to give it an environment.
Yes, I could do that but again, the user may not copy over src/ in the first place. If the user were to only download the contents of src/, my code would fail because src/ wouldn’t exist to write into.
My code is structured in that of a Git repository. It seems to be making directories into the projects root directory when it should be making it inside of the Python script that called the function to make the directory in the first place, I can’t figure out why this is happening though, and I don’t want to add src/ to every function call for the reasons I explained above.
Ok, let’s say a user came to download my project off of my Git repository. They probably won’t need to copy the whole repository over, and would just take the code itself, or download the release. The problem is, if I do every function call like so: make_dir("src/newFolder/"), src/ won’t exist to write into.
src/ is the name of the folder I am storing the source code in on my Replit (which is causing the problem) and Git repository. If I am correct, a Python script would create a folder within its current directory if you did something like this on your local machine, but it’s writing to the project’s root in this case.
It’s been a bit, but I saw @Firepup650’s post and it seems to be outputting /home/runner/pyos3 instead of the expected /home/runner/pyos3/src. I have no idea why this is happening, and I found nothing after googling.
This would happen locally, so why doesn’t this work on Replit? I’m really confused