python中if __name__ == '__main__' 2019-07-24 本文已影响0人 poteman 当模块被直接运行时,以下代码块将被运行; 当模块是被导入即import时,代码块不被运行。