plisttool.py 文件源码

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

项目:rules_apple 作者: bazelbuild 项目源码 文件源码
def _write_plist(self, plist):
    """Writes the given plist to the output file.

    This method also converts it to binary format if "binary" is True in the
    control struct.

    Args:
      plist: The plist to write to the output path in the control struct.
    """
    path_or_file = self._control['output']
    plistlib.writePlist(plist, path_or_file)

    if self._control.get('binary') and isinstance(path_or_file, basestring):
      subprocess.check_call(['plutil', '-convert', 'binary1', path_or_file])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号