在Python中解析.iso文件

发布于 2024-11-19 12:35:22 字数 138 浏览 5 评论 0原文

我想用 python 解析 .iso 文件。我想从 .iso 获取信息和数据,

例如有一个 iso 文件,其名称为 xyz.iso 但实际上它是一个 ubuntu 映像,它有 Readme.txt、.deb pacges 等文件。 我该怎么办呢?

I want to parse .iso file in python. I want to get information and data from .iso

for example there is a iso file, its name xyz.iso
but in fact it is a ubuntu image and it has file like Readme.txt, .deb pacges etc.
How can i do for this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

瘫痪情歌 2024-11-26 12:35:23

您可以用于列出和提取,我测试了第一个。

https://github.com/barneygale/iso9660/blob/master/iso9660.py

import iso9660
cd = iso9660.ISO9660("/Users/murat/Downloads/VisualStudio6Enterprise.ISO")
for path in cd.tree():
    print path

You can use for listing and extracting, I tested the first.

https://github.com/barneygale/iso9660/blob/master/iso9660.py

import iso9660
cd = iso9660.ISO9660("/Users/murat/Downloads/VisualStudio6Enterprise.ISO")
for path in cd.tree():
    print path
飘落散花 2024-11-26 12:35:22

您尝试过 Hachoir 吗?它允许您查看或编辑二进制流,并且它支持 ISO,如其

Have you tried Hachoir? It allows you to view or edit binary streams, and it supports ISO as shown on their documentation. It would allow you to browse the files and folders inside the ISO file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文