Mar-10-2024, 04:08 AM
I thought when I open the file with "with open..." it closes automatically...
Should I use instead of it :
Should I use instead of it :
#with open('C:/Scripts/somescript/Connect-0.ps1','w') as ps : ps = open('C:/Scripts/somescript/Connect-0.ps1','w') ps.write(f"{ln1}\n") ps.write(f"{ln2}\n") ps.close() subprocess.call("C:/Scripts/somescript/Connect-0.ps1")Thank you for working on weekends!