Is there a command like “watch” or “inotifywait” on the Mac?

fswatch fswatch is a small program using the Mac OS X FSEvents API to monitor a directory. When an event about any change to that directory is received, the specified shell command is executed by /bin/bash If you’re on GNU/Linux, inotifywatch (part of the inotify-tools package on most distributions) provides similar functionality. Update: fswatch can … Read more

How to retrieve a module’s path?

import a_module print(a_module.__file__) Will actually give you the path to the .pyc file that was loaded, at least on Mac OS X. So I guess you can do: import os path = os.path.abspath(a_module.__file__) You can also try: path = os.path.dirname(a_module.__file__) To get the module’s directory.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)