可以使用print语句打印返回值,如下所示:

child = pexpect.spawn(self.ssh_cmd, maxread=2000, timeout=60)
print(child) # 打印返回值

或者使用repr()函数打印返回值,如下所示:

child = pexpect.spawn(self.ssh_cmd, maxread=2000, timeout=60)
print(repr(child)) # 打印返回值
child = pexpectspawnselfssh_cmd maxread=2000 timeout=60这里实例化的时候怎么打印返回值

原文地址: https://www.cveoy.top/t/topic/fFSC 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录