How to retrieve a module's path?

后端 未结 20 2093
无人及你
无人及你 2020-11-22 05:34

I want to detect whether module has changed. Now, using inotify is simple, you just need to know the directory you want to get notifications from.

How do I retrieve

20条回答
  •  日久生厌
    2020-11-22 06:04

    you can just import your module then hit its name and you'll get its full path

    >>> import os
    >>> os
    
    >>>
    

提交回复
热议问题