Trouble opening files in python with VS Code

后端 未结 3 2068
情书的邮戳
情书的邮戳 2020-12-06 15:49

I can\'t seem to open basic text files when I run a python script in VS Code, the code runs fine when I use it in Idle but VSCode will give me a FileNotFound error, is there

3条回答
  •  悲&欢浪女
    2020-12-06 16:20

    Whenever you need to debug, you need to change the path of the file to open it in debug mode by simply:

    1. Going to the explorer
    2. Right click on the file and click on copy relative path
    3. Put that path in open

    That should help you!

提交回复
热议问题