Open file . py on Vscode terminal

Asked

Viewed 151 times

0

I’m starting to study python (first language) and I just installed Vscode (previously used Pycharm). I’m getting a lot from the Code settings.

Before I could open my script (main.py) straight from the terminal, just by typing ". main.py". Automatically the script ran on the same terminal. *whereas I am already inside the project folder.

But I ended up defacing something and now when I try to run the script via Command, opens an external python.exe window

How do I go back to the previous configuration and open the script inside the terminal itself?

  • https://code.visualstudio.com/docs/python/python-tutorial I think you have what you need

  • Thanks for the help. But the material you sent me says I have to type in the terminal "python filename.py", ok... it works perfectly. But why did it used to work without typing "python" in the beginning? Is there any way you don’t need to type "python"?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.