os.getcwd() gets the directory that the user is currently in, and sys.path[0] gets the directory of the script. sys.path[0] is better on Linux because you don't need to be in the same directory as the script to run it. this also benefits windows users if they are using the terminal.
os.getcwd() gets the directory that the user is currently in, and sys.path[0] gets the directory of the script. sys.path[0] is better on Linux because you don't need to be in the same directory as the script to run it. this also benefits windows users if they are using the terminal.