1
vayn 2014-12-11 20:33:30 +08:00
不打印 new line 符,然后 stdout.flush 就可以显示你要的效果了
|
2
vayn 2014-12-11 20:35:11 +08:00
|
3
skycity OP @vayn
def zhixing(): stdin,stdout,stderr = s.exec_command(cmd) # cmd_result = stdout.read(),stderr.read() print stdout.read() # for line in cmd_result: # print line print "--------Result from? %s -------" % host 改成这样后还是不行哎,执行TOP命令,显示为空 |
4
vayn 2014-12-11 22:02:56 +08:00
|