Answer the question
In order to leave comments, you need to log in
How to fix a bug in Python code?
There is a line in the code to connect to the VM
ssh = subprocess.Popen("powershell putty.exe ", login, "@", name_server, " -pw", password, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.STDOUT)
Answer the question
In order to leave comments, you need to log in
Why are there so many subprocess.Popen() arguments?
"powershell putty.exe ", login, "@", name_server, "-pw", password, - 6 pieces.
The documentation clearly says: "args should be a sequence of program arguments or else a single string or path-like object."
And also:
class subprocess.Popen(args,
#etc args without an asterisk, so it should be ONE argument i.e. a collection of strings, such as a list.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question