<p>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.</p>

<p>How do I retrieve a module's path in python?</p>

This was trivial.
Each module has a
```
__file__
```
variable that shows its relative path from where you are right now.
Therefore, getting a directory for the module to notify it is simple as:
```
```
os.path.dirname(__file__)
```
```