-4

!/usr/bin/env 蟒蛇

导入系统导入 ToBuildOrNot

repoArray = ["MSS_sims","PCS_CCS"]

def main(argv): 用于 repoArray 中的 repo:

    needsBuild = ToBuildOrNot.ToBuildOrNot(repo)

    if needsBuild == True:
        print "\n",repo,"Needs To rebuilt\n"
        print "---------------------------------------------------------------"

    elif needsBuild == False:
        print "\n", repo,"does NOT Need to be Rebuilt\n"
        print "---------------------------------------------------------------"

    else:
        print "error"

如果名称== '': main(sys.argv[1:])

4

1 回答 1

0

不用于==相等检查isis用于身份检查。

if needsBuild == True:
    print "The MSS_sims Needs To rebuilt"

elif needsBuild == False:
    print "The MSS_sims does NOT Need to be Rebuilt"

else:
    print "error

相关:Python中的`==`和`is`有区别吗?

于 2013-06-26T17:25:06.297 回答