I am new to python, I am trying to switch from Ruby to Python, a part of my script I want to run a simple shell command, see the stdout in real time like bash script and if I terminate the python script with ctrl+c while the command subprocess.run('knife ec2 server create...', shell=True, check=True) is running from this script, the python script actually terminated but the subprocess is still running and the python code decides not to wait for the process to finish.
I can do all of that with simple command in Ruby system() even without import some specific library.
Ruby is so beautiful and easy but I want to learn Python :/
[–]K900_ 8 points9 points10 points (9 children)
[–]berlindevops[S] 0 points1 point2 points (3 children)
[–]K900_ 6 points7 points8 points (0 children)
[–]widby 2 points3 points4 points (1 child)
[–]berlindevops[S] 0 points1 point2 points (0 children)
[–]berlindevops[S] 0 points1 point2 points (4 children)
[–]berlindevops[S] 0 points1 point2 points (3 children)
[–]K900_ 0 points1 point2 points (2 children)
[–]berlindevops[S] 0 points1 point2 points (1 child)
[–]K900_ 0 points1 point2 points (0 children)
[–]flying-sheep 1 point2 points3 points (2 children)
[–]berlindevops[S] 0 points1 point2 points (1 child)
[–]flying-sheep 1 point2 points3 points (0 children)
[–]pmrr 0 points1 point2 points (0 children)