[英]How can you see a list of python modules that YOU imported in Jupyter notebook with asterisk?
标题说明了一切。 你怎么看? 有时我用星号导入 python 模块中的每个方法,我想在 Jupyter notebook 中查看该模块中所有方法的列表。 有没有一个简单的命令?
在 Python 中, __all__
模块变量是一个列表,其中包含使用时导入的所有内容
from module import *
所以只需这样做:
print(module.__all__)
进一步阅读: https : //docs.python.org/3/tutorial/modules.html#importing-from-a-package
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.