Simple and short code examples to find the root directory of your project in different ways. This can be useful in projects where you are reading or writing data to directories inside your project ...
os.path.join (folder, filename) ensures the path is correct for the system. On Windows, it uses backslashes (reports\summary.txt); on Linux and macOS it uses forward slashes (reports/summary.txt).
The DLL search behavior was changed in Python 3.8 so that only system paths and directories added with os.add_dll_directory() are searched for DLLs, see: https://docs ...