Python Script Can't Find File When Opening With Vs Code, But Works Ok With Terminal
I've got a python script which works with some files using normal with open('input.txt', 'r') as file: And there is input.txt in the same folder. Problem is, when I launch it with
Solution 1:
In the launch config change the CWD to the folder
{
"version": "0.2.0",
"configurations": [
{
....,
"cwd" : "${workspaceFolder}/${relativeFileDirname}"
}
]
}
Post a Comment for "Python Script Can't Find File When Opening With Vs Code, But Works Ok With Terminal"