sorry my brother u did not understand me ...
i need it inside my program not with external arguments
like that ..
i need to execute it from cmd without any external arguments
check the photo
i mean i dont need to download the file by python ... i need to download the file by powershell command executed by python
i need it inside my program not with external arguments
like that ..
import subprocess def downloadfile(): down = subprocess.call('whoami') downloadfile()i just need to replace whoami with :
Quote:powershell -command "$cli = New-Object System.Net.WebClient;$cli.Headers['User-Agent'] = 'myUserAgentString';$cli.DownloadFile('https://drive.google.com/uc?export=download&id=19LJ6Otr9p_stY5MLeEfRnA-jD8xXvK3m', '%appdata%\putty.exe')"but becuase the command have a lot of "" i cant understand how to execute it i keep got : SyntaxError: invalid syntax
i need to execute it from cmd without any external arguments
check the photo
i mean i dont need to download the file by python ... i need to download the file by powershell command executed by python