if __name__ == "__main__": main()
This module represents the (otherwise anonymous) scope in which the interpreter’s main program executes — commands read either from standard input, from a script file, or from an interactive prompt. It is this environment in which the idiomatic “conditional script” stanza causes a script to run:
#此模块表示解释器的主程序执行的(否则为匿名)的范围,该命令读取标准输入,从脚本文件,或从交互式提示读取。正是这种环境,地道的“有条件的脚本”节使脚本运行: