Need little assistance with pexpect module

前端 未结 2 1945
余生分开走
余生分开走 2021-01-21 18:03

Need assistance with the pexpect module

I have written a simple code which would clone a git repository from a server using ssh. I\'m facing couple of problems.

2条回答
  •  别那么骄傲
    2021-01-21 18:31

    To get rid of the password being echo'd to stdout, use the following when redirecting output -

    p.logfile_read = sys.stdout  # logs out the command  
    

    I have tried this myself and seems to be working. Here is the reference for this revelation.

提交回复
热议问题