Python:在程序执行时在每个命令行之后打印输出

时间:2014-11-06 19:23:50

标签: python python-2.7 python-3.x

我使用单元测试框架(utf)来执行我的脚本来测试命令,

#General config commands part 2.

from utfcore import *
from utf_ssr_cli import *
import time
from utf_ssr_cli import *
import re
import collections

def general_config_second(cli):
    cli.send_cmd("config")
    #print output
    cli.send_cmd("logging events process pppoe circuit keep-after up")
    #print output
    cli.send_cmd("logging events process pppoe circuit keep-after down")
    #print output
    cli.send_cmd("logging events circuit keep-after up")
    #print output
    cli.send_cmd("logging events size max-circuits 48000")
    #print output
    cli.send_cmd("global synchronization option 2")
    #print output

cli = CLI()
general_config_second(cli)

我想在我的脚本执行每一行之后打印每个命令的输出。我需要一个输出

0 个答案:

没有答案