def appdir_from_executable(exepath):
    #  The standard layout is <appdir>/ESKY_APPDATA_DIR/<vdir>/<exepath>.
    #  Stripping of <exepath> is done by _bs_appdir_from_executable.
    vdir = _bs_appdir_from_executable(exepath)
    appdir = os.path.dirname(vdir)
    #  On OSX we sometimes need to strip an additional directory since the
    #  app can be contained in an <appname>.app directory.
    if sys.platform == "darwin" and is_version_dir(appdir):
        appdir = os.path.dirname(appdir)
    # TODO: remove compatability hook for ESKY_APPDATA_DIR=""
    if ESKY_APPDATA_DIR and os.path.basename(appdir) == ESKY_APPDATA_DIR:
        appdir = os.path.dirname(appdir)
        # Remove trailing slash if at the root of a drive on win32
        if sys.platform == "win32" and len(appdir) == 3:
            appdir = appdir[:2]
    return appdir
Registers the specified callback function with the given name.
dataset/ETHPy150Open cloudmatrix/esky/esky/util.py/appdir_from_executable--crossover with--dataset/ETHPy150Open spantaleev/sijax-python/sijax/core.py/Sijax.register_callback