您可以从cmdA函数运行cmdB和cmdC函数。
def cmdB(): pass def cmdC(): pass def cmdA(): # start recording information print "recording started" #run cmdB cmdB() # run cmdC cmdC() # stop recording print "recording stopped" if __name__ == '__main__': cmdA()