How to find all child modules in Python?

后端 未结 6 1261
走了就别回头了
走了就别回头了 2021-02-19 11:46

While it is fairly trivial in Python to import a \"child\" module into another module and list its attributes, it becomes slightly more difficult when you want to import all

6条回答
  •  失恋的感觉
    2021-02-19 12:29

    I think the best way to do this sort of plugin thing is using entry_points and the API for querying them.

提交回复
热议问题