import 模块 as 可以定义小名
# import test as s #使用别名 调取函数或者变量 # s.say_hello() import test ,model02 一次调取两个模板 test.say_hello() model02.test() from 模块名称 import 变量名(或者函数名) 导入test函数,只能使用test函数不能使用其他函数的内容 from model02 import test # 调用函数 # test() # #缺陷 : 就近原则 # # from 模块名 import 函数 as 别名 # from mokuai3 import func as w # w() form import * 代表所有的变量名称 _下划线开头变量除外 #from mokuai3 import * #查找路径 import sys 调用内置函数 ret=sys.path #查找路径 print(ret) 关于 ___name___ 的使用 import model02 print(model02.name)导入 model02包,去除 name中的值