I can compile and see the result from cpp file in vs code. But, but when I try compile python file by pressing Ctrl+Alt+N I can't see the result. I can see result only with right click and choosing Run Python file in terminal, as you can see in pictures. I want to compile smoothly cpp and python files in vs code. Is it possible?
Asked
Active
Viewed 430 times
0
-
Ctrl+Alt+N isn't a vscode builtin keyboard shortcut, it might only be provided by your C++ extension. – SuperStormer Jan 08 '21 at 12:53
-
Does this answer your question? [Python not working in command prompt?](https://stackoverflow.com/questions/13596505/python-not-working-in-command-prompt) – SuperStormer Jan 08 '21 at 12:56
-
@Yksisarvinen "Python was not found" in Croatian; so yeah it looks like a path issue. OP, see the 2nd answer in the dupe question – SuperStormer Jan 08 '21 at 12:56
-
1I installed Python and selected python intrerpreter but it doesnt' work when I compile. I can run it only by run python file in terminal. I think you can't run cpp and python files in one vs code. You have to choose is it your vs code will be for c++ or python. – loco_lux Jan 08 '21 at 12:57
-
1Have you properly set the `launch.json`, `settings.json`? And are the compiler/interpretor paths properly set? – anurag Jan 08 '21 at 13:08
-
You might want to go through [C++ Tut](https://code.visualstudio.com/docs/languages/cpp) and [Python Tut](https://code.visualstudio.com/docs/python/python-tutorial) – anurag Jan 08 '21 at 13:09
-
Now it works, I dunno what I did. I think that when I installed python through MS store it started working. The problem was keyword python in cmd, cos py is the correct key word. When I installed python through MS store, now keyword python is also good. So strange. – loco_lux Jan 08 '21 at 13:26