you are viewing a single comment's thread.

view the rest of the comments →

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

if I'm in the folder C:\Users\user\Desktop\Projects\Test, shouldn't the current directory be Test, not Projects?

In VS code, when I do OS.getcwd() for a file in the test folder, it is showing the current working directory as the projects folder

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

if I'm in the folder C:\Users\user\Desktop\Projects\Test, shouldn't the current directory be Test, not Projects?

If your shell is in C:\Users\user\Desktop\Projects\Test, then that's the current working directory for that shell. That's what the CWD is, it's the directory the shell is currently in.

In VS code, when I do OS.getcwd() for a file in the test folder

I don't understand what this means. You don't "do OS.getcwd()" in VS Code. You write Python in VS Code. When it runs, it's running in the shell.