# 测试__main__ and __name__ 机制 # 每个python模块都有内置的变量__name__ # 当运行模块被执行的时候,__name__等于__main__ # 当被import到其他模块的时候,则__name__等于模块名称
from _ctypes import * print ("I'm the first!") print(__name__) if __name__=="__main__": print("I'm the second!")
import test_dll print(__name__)