有没有办法检查源代码(或编译的代码对象)并告诉在Python 3.3中导入哪些模块?
例如,在:
import foo def func(): from bar import * return 42
我想能够告诉模块foo和bar正在导入.我希望避免使用正则表达式或模式匹配.