util.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:renpy-shader 作者: bitsawer 项目源码 文件源码
def _get_soname(f):
            if not f:
                return None

            try:
                proc = subprocess.Popen(("/usr/ccs/bin/dump", "-Lpv", f),
                                        stdout=subprocess.PIPE,
                                        stderr=subprocess.DEVNULL)
            except OSError:  # E.g. command not found
                return None
            with proc:
                data = proc.stdout.read()
            res = re.search(br'\[.*\]\sSONAME\s+([^\s]+)', data)
            if not res:
                return None
            return os.fsdecode(res.group(1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号