I have made a piece of code to automate making a new project. I ahve mangaged to create the file in a location I like, create the file and create a test python file. How would I open that file in vs code?
import subprocess,os,time
projectName = input("What is the name of the project?\n")
filename = "test"
fileEx = '.py'
os.chdir('../')
os.chdir('../')
os.chdir('../')
os.chdir('.\Documents\ ')
os.chdir('.\programs\ ')
project = subprocess.Popen(["powershell","md",projectName])
file = filename + fileEx
fileLoctaion = os.getcwd() + file
d = os.getcwd() + f'\{projectName}\ '
time.sleep(1)
os.chdir(d)
with open(file, 'w') as fp:
pass