Command executed with Paramiko does not produce any output

前端 未结 1 1993
忘了有多久
忘了有多久 2020-12-06 23:40

When I try to do

stdin, stdout, stderr = client1.exec_command(\'glass-version\')
print stdout.readlines()

I am getting an empty output.

相关标签:
1条回答
  • 2020-12-07 00:22

    If you get no output on stdout, it is usually because the command fails to start.

    Read stderr (stderr.readlines()) to check for any errors.


    Quite often the error is "<command> not found". For that see
    Some Unix commands fail with "<command> not found", when executed using Python Paramiko exec_command

    0 讨论(0)
提交回复
热议问题