Get current path, refers to `how-do-i-get-the-path-of-the-current-executed-file-in-python`_

        Examples:

            .. code-block:: Python

               from pygeoc.utils import UtilClass
               curpath = UtilClass.current_path(lambda: 0)

        .. _how-do-i-get-the-path-of-the-current-executed-file-in-python:
            https://stackoverflow.com/questions/2632199/how-do-i-get-the-path-of-the-current-executed-file-in-python/18489147#18489147

def current_path(local_function):
        """Get current path, refers to `how-do-i-get-the-path-of-the-current-executed-file-in-python`_

        Examples:

            .. code-block:: Python

               from pygeoc.utils import UtilClass
               curpath = UtilClass.current_path(lambda: 0)

        .. _how-do-i-get-the-path-of-the-current-executed-file-in-python:
            https://stackoverflow.com/questions/2632199/how-do-i-get-the-path-of-the-current-executed-file-in-python/18489147#18489147
        """
        from inspect import getsourcefile
        fpath = getsourcefile(local_function)
        if fpath is None:
            return None
        return os.path.dirname(os.path.abspath(fpath))