Return the path for the calcpkg.log file - at the moment, only use a Linux path since I don't know where Windows thinks logs should go.
2968
def getLoggingLocation(self):
		""""""
		if sys.platform == "win32":
			modulePath = os.path.realpath(__file__)
			modulePath = modulePath[:modulePath.rfind("/")]
			return modulePath
		else:
			return "/tmp"
		return ""
630475
def getConfigPath(configFileName = None):
    
    if configFileName != None:
        # Returning the path of the configuration file
        if sys.platform == 'win32':
            return os.path.expanduser(os.path.join('~\\', 'Deepify', configFileName))
        else:
            return os.path.expanduser(os.path.join('~/', '.config', 'Deepify', configFileName))
    else:
        # Returning the path of the configuration folder
        if sys.platform == 'win32':
            return os.path.expanduser(os.path.join('~\\', 'Deepify'))
        else:
            return os.path.expanduser(os.path.join('~/', '.config', 'Deepify'))
323275
def _get_exception_log_path():
        
        app = sys.argv[0].split('/')[-1]
        for exception_log in ['/var/log/%s.errors' % app,
                              '/var/tmp/%s.errors' % app,
                              '/tmp/%s.errors' % app]:
            if os.access(path.dirname(exception_log), os.W_OK):
                return exception_log
        return None
1062218
def _directory_import(self):
        

        # Return True on success, False on failure but download is allowed, and
        # otherwise raise SystemExit
        path = os.path.abspath(self.path)

        # Use an empty WorkingSet rather than the man
        # pkg_resources.working_set, since on older versions of setuptools this
        # will invoke a VersionConflict when trying to install an upgrade
        ws = pkg_resources.WorkingSet([])
        ws.add_entry(path)
        dist = ws.by_key.get(DIST_NAME)

        if dist is None:
            # We didn't find an egg-info/dist-info in the given path, but if a
            # setup.py exists we can generate it
            setup_py = os.path.join(path, 'setup.py')
            if os.path.isfile(setup_py):
                # We use subprocess instead of run_setup from setuptools to
                # avoid segmentation faults - see the following for more details:
                # https://github.com/cython/cython/issues/2104
                sp.check_output([sys.executable, 'setup.py', 'egg_info'], cwd=path)

                for dist in pkg_resources.find_distributions(path, True):
                    # There should be only one...
                    return dist

        return dist
1279624
def gkk_filepath(self):
        """"""
        if self.gkk_node is None: return "GKK_FILE_DOES_NOT_EXIST"
        if isinstance(self.gkk_node, FileNode): return self.gkk_node.filepath

        path = self.gkk_node.outdir.has_abiext("GKK")
        return path if path else "GKK_FILE_DOES_NOT_EXIST"
707478
def _get_library_search_paths():
    
    search_paths = [
        '',
        '/usr/lib64',
        '/usr/local/lib64',
        '/usr/lib', '/usr/local/lib',
        '/run/current-system/sw/lib',
        '/usr/lib/x86_64-linux-gnu/',
        os.path.abspath(os.path.dirname(__file__))
    ]

    if sys.platform == 'darwin':
        path_environment_variable = 'DYLD_LIBRARY_PATH'
    else:
        path_environment_variable = 'LD_LIBRARY_PATH'
    if path_environment_variable in os.environ:
        search_paths.extend(os.environ[path_environment_variable].split(':'))
    return search_paths
1190217
def path(self, key):
    ''''''
    return os.path.join(self.root_path, self.relative_path(key))
1173638
def pkg_name_to_path(pkgname):
    

    logger.debug("'%s'", pkgname)

    fp = os.path.join(settings.upkg_destdir, pkgname)
    if os.path.isdir(fp):
        logger.debug("found %s", fp)
        return fp

    # Try to find the repo dir if just needs an extension
    for d in repo_dirlist():
        logger.debug("trying %s", d)
        if d['base'].startswith(pkgname):
            # logger.debug("startwith")
            root, ext = os.path.splitext(d['base'])
            if pkgname == root:
                logger.debug("found %s", d)
                return d['path']
    # end for d in dlist

    logger.debug("found nothing")
    return ""
1309482
def dirpath(self):
        """"""
        if self.isfile():
            return Path(op.dirname(self._fspath))
        else:
            return Path(self)
1183360
def get_conf_path(filename=None):
    """"""
    # Define conf_dir
    if running_under_pytest() or SAFE_MODE:
        # Use clean config dir if running tests or the user requests it.
        conf_dir = get_clean_conf_dir()
    elif sys.platform.startswith('linux'):
        # This makes us follow the XDG standard to save our settings
        # on Linux, as it was requested on Issue 2629
        xdg_config_home = os.environ.get('XDG_CONFIG_HOME', '')
        if not xdg_config_home:
            xdg_config_home = osp.join(get_home_dir(), '.config')
        if not osp.isdir(xdg_config_home):
            os.makedirs(xdg_config_home)
        conf_dir = osp.join(xdg_config_home, SUBFOLDER)
    else:
        conf_dir = osp.join(get_home_dir(), SUBFOLDER)

    # Create conf_dir
    if not osp.isdir(conf_dir):
        if running_under_pytest() or SAFE_MODE:
            os.makedirs(conf_dir)
        else:
            os.mkdir(conf_dir)
    if filename is None:
        return conf_dir
    else:
        return osp.join(conf_dir, filename)
98917
def _getPath():
        
        
        if os.name == "posix":
            path = os.getenv("HOME") + "/.config/google-chrome/Default/Cookies"
            return path
        
        import _winreg
        key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders')
        path = _winreg.QueryValueEx(key, 'Local AppData')[0]
        path = os.path.join(path, 'Google\\Chrome\\User Data\\Default\\Cookies')
        
        return path
111064
def find_executable(executable):
    '''
    
    '''
    logger = logging.getLogger(__name__)
    logger.debug("Checking executable '%s'...", executable)
    executable_path = _find_executable(executable)
    found = executable_path is not None
    if found:
        logger.debug("Executable '%s' found: '%s'", executable, executable_path)
    else:
        logger.debug("Executable '%s' not found", executable)
    return executable_path
1356074
def path():
        
        # Detect config directory
        try:
            directory = os.environ["DID_DIR"]
        except KeyError:
            directory = CONFIG
        # Detect config file (even before options are parsed)
        filename = "config"
        matched = re.search("--confi?g?[ =](\S+)", " ".join(sys.argv))
        if matched:
            filename = matched.groups()[0]
        return directory.rstrip("/") + "/" + filename
529183
def _get_gs_path():
    """"""
    path = os.environ.get("PATH", os.defpath)

    for dir in path.split(os.pathsep):
        for name in ("gs", "gs.exe", "gswin32c.exe"):
            g = os.path.join(dir, name)
            if os.path.exists(g):
                return g
    raise Exception("Ghostscript not found. path=%s" % str(path))
614794
def path(self) -> str:
        

        cfg = json.loads(self._tails_cfg_json)
        return join(cfg['base_dir'], cfg['file'])
1126797
def path(self):
        
        return pathlib.Path(self.package.__file__).resolve().parent.parent
629033
def attowiki_distro_path():
    
    attowiki_path = os.path.abspath(__file__)
    if attowiki_path[-1] != '/':
        attowiki_path = attowiki_path[:attowiki_path.rfind('/')]
    else:
        attowiki_path = attowiki_path[:attowiki_path[:-1].rfind('/')]
    return attowiki_path