Aug-31-2018, 03:37 PM
i still got the same error :
![[Image: Untitled.png]](https://s33.postimg.cc/fwdq636st/Untitled.png)
run command on system with multi qoutes
|
Aug-31-2018, 03:37 PM
i still got the same error :
![]()
Aug-31-2018, 04:47 PM
Please post code in code tags, not images see BBCODE
Also when posting errors, use error tags (also in above link), and make sure you post the errors verbatim. I don't use power shell, so can't run code. command is approximate, and I would never do what you are trying to do in the first place. Why torture yourself, it can all be done so easily using pure python code. Suggest you post on https://social.technet.microsoft.com/For...powershell (Aug-31-2018, 04:47 PM)Larz60+ Wrote: Please post code in code tags, not images see BBCODEok this is the code : import subprocess def downloadfile(): mycommand = "powershell -command "$cli = New-Object System.Net.WebClient;$cli.Headers['User-Agent'] = {};$cli.DownloadFile('https://drive.google.com/uc?export=download&id=19LJ6Otr9p_stY5MLeEfRnA-jD8xXvK3m', '%appdata%\putty.exe')".format(myUserAgentString) down = subprocess.call(mycommand) downloadfile()and this is the error : my code is working outside python ... the problem with python because the command line have multi " and multi $ ...
Aug-31-2018, 05:11 PM
looks like you're missing a single quote on id,
I'm guessing, but: id='19LJ6Otr9p_stY5MLeEfRnA-jD8xXvK3m',
Aug-31-2018, 05:14 PM
Aug-31-2018, 05:17 PM
OK, I can't help without being able to run powershell, so this is last post from me try the link I showed above.
Aug-31-2018, 05:19 PM
oka thank u very much bro i will wait another expert ...
|
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Os.system("shutdown"); command not found | cosmin1805 | 4 | 3,154 |
Nov-13-2022, 02:07 PM Last Post: cosmin1805 |
|
Help with multi-window system | garynewport | 3 | 11,979 |
Mar-16-2022, 03:05 AM Last Post: deanhystad |
|
how to run linux command with multi pipes by python !! | evilcode1 | 2 | 8,754 |
Jan-25-2021, 11:19 AM Last Post: DeaD_EyE |
|
Difference between os.system("clear") and os.system("cls") | chmsrohit | 7 | 19,510 |
Jan-11-2021, 06:30 PM Last Post: ykumar34 |
|
![]() |
Difference between Python's os.system and Perl's system command | Agile741 | 13 | 9,261 |
Dec-02-2019, 04:41 PM Last Post: Agile741 |
System Command | sushmita13 | 3 | 4,442 |
Apr-25-2017, 11:53 PM Last Post: wavic |