def _absPath(self, relpath):

        # Pass through URIs and absolute paths.
        if self.isUrl(relpath) or relpath[0] == '/':
            return relpath

        # This won't deal with ~user/ syntax, but it's much less
        # common anyway.
        if relpath.startswith('~/') and 'HOME' in os.environ:
            return os.path.join(os.environ['HOME'], relpath[2:])

        if self._configFileStack:
            relativeTo = os.path.dirname(self._configFileStack[-1])
        else:
            relativeTo = os.getcwd()

        if self.isUrl(relativeTo):
            parts = urlparse.urlsplit(relativeTo)
            return urlparse.urlunsplit((parts.scheme, parts.netloc, os.path.normpath(os.path.join(parts.path, relpath)), parts.query, parts.fragment))
        return os.path.normpath(os.path.join(relativeTo, relpath))
Set+Expire combo command
dataset/ETHPy150Open sassoftware/conary/conary/lib/cfg.py/ConfigFile._absPath--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/vendor/txredisapi.py/RedisProtocol.setex