Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse .iso files in Python [duplicate]

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?

like image 644
TCOLAK Avatar asked Jul 09 '11 18:07

TCOLAK


2 Answers

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
like image 22
mcolak Avatar answered Nov 10 '22 09:11

mcolak


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.

like image 123
albertein Avatar answered Nov 10 '22 09:11

albertein