G
G
GH0st_is_HAcker2021-11-08 22:28:57
Python
GH0st_is_HAcker, 2021-11-08 22:28:57

Why does python on vs code incorrectly create a folder with vs code?

import os
if not os.path.exists("data"):
        os.mkdir("data")

Good afternoon!!!
so I decided to try the sun code and ran into such garbage

In pycharm, my folder is created along with files in the same directory
618979dce967c277810860.png
, but in vs code it is created outside the directory
61897a3aa8e1e620733199.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2021-11-08
@GH0st_is_HAcker

launch settings are in the .vscode/launch.json file,
add a parameter there cwdwith the value"${fileDirname}"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question