2.7函數
__import__(module_name[, globals[, locals[, fromlist]]]) #可選參數默認爲globals(),locals(),[]
__import__('os')
__import__('os',globals(),locals(),['path','pip']) #等價於from os import path, pip接口
導入模塊,import語句就是調用這個函數進行導入工做的ip
sys = __import__('sys') <==> import syspip
sys = __import__('sys', fromlist = ['*']) <==> from sys import *import