# encoding: UTF-8 print 'laoding vntrader.vtConstant' from language import constant # 将常量定义添加到vtConstant.py的局部字典中 d = locals() for name in dir(constant): if '__' not in name: d[name] = constant.__getattribute__(name) print 'finished load vntrader.vtConstant'