Тёмный
Code4You
Code4You
Code4You
Подписаться
channel will help to learn and enhance your knowledge on programing language.
Комментарии
@vairaul
@vairaul 5 дней назад
Thank you.
@delindsay
@delindsay 4 месяца назад
Thank you.
@jhenry4948
@jhenry4948 6 месяцев назад
Can you run it from inside your IDE and it up the terminal print to the terminal in real time
@danielgeorge5239
@danielgeorge5239 8 месяцев назад
Say I wanted to run ssh in a subprocess as a remote shell?
@bennguyen1313
@bennguyen1313 8 месяцев назад
If in windows, I do: type logfile | cantools plot inputfile.dbc What would the syntax look like if I'm trying to do using Popen? The following did not work as it did not pipe the logfile contents to cantools args = ["plot 1.dbc"] p = Popen(['cantools'] + args, stdout=PIPE)
@eassonweisshaar9900
@eassonweisshaar9900 10 месяцев назад
Awesome video, just got some work-related stuff working thanks to this video.
@77Chester77
@77Chester77 Год назад
It took me over 2h and several Editing apps to find out, how to combine two images. Thank you very much, sir.
@dylanposadas6415
@dylanposadas6415 Год назад
How do you combine three photos
@collectiveworld_247
@collectiveworld_247 Год назад
Nice explanation 👍👏
@zahidriaz371
@zahidriaz371 Год назад
give example open other then cmd and then process onit.
@liamstevens2690
@liamstevens2690 Год назад
Thank you, saved me a lot of hassle :)
@TreBros
@TreBros Год назад
Thank you very much! This helped me do exactly what I needed for file backups auto deletion after it passes retention time! Much appreciated!
@venkata1857
@venkata1857 Год назад
Nice explanation..... Is there any alternate library module to run with python 2.7 version
@PradeepKumar-jh2gn
@PradeepKumar-jh2gn Год назад
Good one!
@Mr25thfret
@Mr25thfret Год назад
Very easy to understand! I used it as you taught me with great success. Thank you!
@RelaxingMusic-dt4cr
@RelaxingMusic-dt4cr Год назад
please can anyone advise how can I use Atom with auto-completion same as you do..I'm using Atom on MAC OS
@suriyam5740
@suriyam5740 Год назад
Good one bro
@praneethyerram815
@praneethyerram815 2 года назад
can you tell me hw to delete multiple folders at a time which are empty and non emtpy
@ayencoscolfield3312
@ayencoscolfield3312 2 года назад
I just stumbled into your channel now this is cool man and well done
@ragtop63
@ragtop63 2 года назад
Good video. However, I have read multiple posts regarding the use of this module and almost all of them recommend against using shell=True. What are your thoughts?
@thomasli2261
@thomasli2261 2 года назад
Very nice video! Thank you for making people's life easier
@ieronimbosh5233
@ieronimbosh5233 2 года назад
thank u
@zensur100
@zensur100 2 года назад
thank you so much!
@anzwertree
@anzwertree 2 года назад
Could I used this to monitor the breads I make, giving me a live counting list of each loaf I made throughout the day, so I can tell when one of the loaves is ready to cut and serve? Each bread needs to cool for up to 2 hours. So I'd like to be able to keep adding breads to an ever expanding list. That way I can just look at it and tell how long each batch of bread has been cooling. I'm a baker. Thanks
@PGhai
@PGhai 2 года назад
Nice video, but your heading is misleading, I was looking for subprocess.run
@zName1
@zName1 2 года назад
Helped out a lot since the information I was finding elsewhere was outdated. Thanks.
@nk_nicolasmayoral
@nk_nicolasmayoral 2 года назад
And in case if i want to save in a file, the standard out and the error? For example: -c command -f file-out -l log-file . How can i do in that case?
@pravalikakashineni2196
@pravalikakashineni2196 2 года назад
Do more videos
@surajjoshi3433
@surajjoshi3433 2 года назад
subprocess only runs on windows??
@ganeshpadala3751
@ganeshpadala3751 2 года назад
Excellent video bro ,
@prateeksarangi9187
@prateeksarangi9187 2 года назад
Thanks
@adamdenault4324
@adamdenault4324 2 года назад
you are life-saver. Thank you so much
@MAMP
@MAMP 2 года назад
Tried for an hour in 2.10 and these steps dont follow. I can never move the pasted layer off to the side like the video shows.
@hirakhax
@hirakhax 2 года назад
What is the ubuntu version u are using?
@MrSindhavjay
@MrSindhavjay 2 года назад
Great video; is there any way we can order glob module to select file in sequence ex. Have File name with (1-30) . Want to process file 1-30 in sequence of 1,2,3....30
@mayconfelipe4981
@mayconfelipe4981 2 года назад
nice video
@ExploitHunter
@ExploitHunter 2 года назад
Make py keylogger
@aureliusnt
@aureliusnt 2 года назад
Thanks! Very cool explanation.
@andrek_m
@andrek_m 2 года назад
good tutorial thank you! <3
@pradyumnakatageri3475
@pradyumnakatageri3475 2 года назад
Thank you for the explanation!. I have one doubt. Suppose if I want to execute a command with multiple arguments to be passed in the CLI using the Popen subprocess. For Eg. jira --action createIssue --project "$1" --type "$2" --description $3 I get an error stating that the bufsize must be an integer. But when I provide a valid value for the bufsize argument in Popen. I still get an error stating too many values passed for bufsize argument
@code4you753
@code4you753 2 года назад
May be when you are passing the argument it is taking as char. You may need to cast your value as integer and try. eg: suppose your are passing $1 then first_num = int(sys.argv[1])
@amosburton4728
@amosburton4728 2 года назад
Why is every youtube educational video produced out of India such low quality?
@Heynmffc
@Heynmffc Год назад
This one isn’t that bad? And I think we’re just spoiled in the west.
@Vetal116
@Vetal116 2 года назад
сратые индусы))
@anuragmishra1800
@anuragmishra1800 2 года назад
How can i read the output of long running process without pausing the program
@d3mist0clesgee12
@d3mist0clesgee12 3 года назад
Great video bro, still works in 2021, thanks again.
@yousen5678
@yousen5678 3 года назад
hey, please how i can rexecute my script python an intern if it's stopped ?
@code4you753
@code4you753 3 года назад
you mean to say subprocess failed then you want to execute once again ? You can write via n-number ways. I am giving you one example using function. if success then returncode will return 0 else other than 0. You can loop through. You can add stdout and stderr. If you want capture value of stdout and stderr. ================================ import subprocess def run_os_cmd(cmd): p1 = subprocess.Popen(cmd, s p1.wait() return p1.returncode cmd = "du -sh /tmp" cmd_status = run_os_cmd(cmd) if cmd_status != 0: cmd_status = run_os_cmd(cmd)
@Jonix-redhat
@Jonix-redhat 3 года назад
Hi! if I run a bioinformatics pipeline, will this method show the live feed of the pipeline and also capture stderr if something goes wrong in the pipeline? today I have tried using subprocess.run, but if I use the capture_output=True, I wont get any live feed. and if I skip that I will get live feed but I wont get any stderr so I can see what went wrong in case it does:/ pls help!:)
@code4you753
@code4you753 3 года назад
in some cases, your error will captured in stdout also. Believe, you are capturing stdout and stderr also. Please check value of both. You will get required info. To know if your subprocess completed or not, You can check with returncode. If returncode == 0 then success else fail.
@prashanthb6521
@prashanthb6521 Год назад
In the SULTAN package you have something like Streaming=True for this purpose.
@deepikapant9103
@deepikapant9103 3 года назад
Explained so clearly all aspects of subprocess
@gesseanedejesusgomes349
@gesseanedejesusgomes349 3 года назад
Good night teacher! Would you have any commands to verify that the person ran the application as an administrator?
@code4you753
@code4you753 3 года назад
Usually application should handle and authenticate if running by adminstrator or not. If you are considering python code as application and your running on window then you can check via ctypes.windll.shell32.IsUserAnAdmin() ==> 0 ## running via normal user 1 means running by adminstrator. For unix, you can use os module or getpass.getuser(). You may combine also.
@jbn9029
@jbn9029 3 года назад
Thank you. Very clear and simple!
@Azar211
@Azar211 3 года назад
Thank you for this concise and greately efficient vidéo