Home > Mobile >  Subprocess opening the file in a new Visual Studio Code tab
Subprocess opening the file in a new Visual Studio Code tab

Time:04-13

I use subprocess to activate a python file on Visual Studio Code:

import subprocess

subprocess.call("File_To_Sub.py", shell=True)

I needed to uninstall VSCode but when I reinstalled, when activating this code, it run in the terminal but opens the file (File_To_Sub.py) in a program tab too.

This didn't happen before, I would like to know why this is happening and what should I do to make sure it (open file tab) doesn't happen again

CodePudding user response:

You have changed the default programs of .py file on your computer.

You can right a python file -> select Properties -> Opens with -> choose some other programs.

  • Related