0
我想列出列表中包含子模块调用的所有函数调用。在我的情况下,它是os模块的os_list。我想存储os.path模块调用的调用以及this.For函数调用的识别我正在使用“__call”,什么是用于识别模块。如何找到模块中的子模块调用
for name in dir(os):
attr = getattr(os, name)
if hasattr(attr, '__call__'):
os_list.append(name)
让它更清晰一点。你正在试图找到所有在当前或目标模块中使用的'os'函数? – CommonSense