Return the normalized path for the connection log, raising an
        exception if it can not written to.

        :return: str
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
1324924
def base_path(self):
        """"""
        return os.path.join(self.conn.abs_root, self.name)
374271
def path(self):
        
        path = self._path()
        statobj = os.stat(path)
        ae = self.request.META.get('HTTP_ACCEPT_ENCODING', '')
        if re_accepts_gzip.search(ae) and getattr(settings, 'UMAP_GZIP', True):
            gzip_path = "{path}{ext}".format(path=path, ext=self.EXT)
            up_to_date = True
            if not os.path.exists(gzip_path):
                up_to_date = False
            else:
                gzip_statobj = os.stat(gzip_path)
                if statobj.st_mtime > gzip_statobj.st_mtime:
                    up_to_date = False
            if not up_to_date:
                gzip_file(path, gzip_path)
            path = gzip_path
        return path
368893
def get_connection_logging(self, loadbalancer):
        
        uri = "/loadbalancers/%s/connectionlogging" % utils.get_id(loadbalancer)
        resp, body = self.api.method_get(uri)
        ret = body.get("connectionLogging", {}).get("enabled", False)
        return ret
586152
def pathname(self):
        
        slug = self.name
        slug = unidecode.unidecode(slug)
        slug = slug.replace("-", "")
        slug = re.sub(r"[^\w\.]+", "-", slug).strip("-")
        return os.path.join(*slug.split("."))
1211542
def log_file(self):
        
        log_file = self.get('log')
        if not log_file:
            log_file = '%s.log' % (self.name)
            self.set('log', log_file)
        return os.path.join(self.initial_dir, self.get('log'))
1339829
def file_path(self):
        
        return os.path.join(keyring.util.platform.data_root(), self.filename)
826990
def get_connection_params(self):
        
        return {
            'uri': self.settings_dict['NAME'],
            'tls': self.settings_dict.get('TLS', False),
            'bind_dn': self.settings_dict['USER'],
            'bind_pw': self.settings_dict['PASSWORD'],
            'retry_max': self.settings_dict.get('RETRY_MAX', 1),
            'retry_delay': self.settings_dict.get('RETRY_DELAY', 60.0),
            'options': {
                k if isinstance(k, int) else k.lower(): v
                for k, v in self.settings_dict.get('CONNECTION_OPTIONS', {}).items()
            },
        }
782441
def _normalize_path(self, path):
        
        norm_path = os.path.normpath(path)
        return os.path.relpath(norm_path, start=self._get_working_dir())
1316088
def _get_socket_paths(self):
        
        socket_pattern = os.path.join(self.config['socket_path'],
                                      (self.config['socket_prefix'] +
                                       '*.' + self.config['socket_ext']))
        return glob.glob(socket_pattern)
1253634
def path_to_str(path):
    
    try:
        from pathlib import Path as _Path
    except ImportError:  # Python < 3.4
        class _Path:
            pass
    if isinstance(path, _Path):
        return str(path)
    return path
1250582
def path(self):
        ""
        prefix = ()
        if self.parent:
            prefix = self.parent.path

        if self.id_or_name:
            return prefix + (self.kind, self.id_or_name)

        return prefix + (self.kind,)
391142
def log_path(cls, project, log):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/logs/{log}", project=project, log=log
        )
1239265
def path(self):
        
        raw_path = wsgi_decoding_dance(
            self.environ.get("PATH_INFO") or "", self.charset, self.encoding_errors
        )
        return "/" + raw_path.lstrip("/")
154359
def normalize_path(path):
    
    if path in ['//', '/', '']:
        return '/'
    npath = normpath(unquote(path, exceptions=QUOTE_EXCEPTIONS['path']))
    if path[-1] == '/' and npath != '/':
        npath += '/'
    return npath
1126797
def path(self):
        
        return pathlib.Path(self.package.__file__).resolve().parent.parent
640412
def get_current_path(self):
        
        path = self.tree_view.fileInfo(
            self.tree_view.currentIndex()).filePath()
        # https://github.com/pyQode/pyQode/issues/6
        if not path:
            path = self.tree_view.root_path
        return path