Open a file within an ISO in python.

D

danikar

Is there a way to open a file that is inside of an ISO in python?

Say I have an ISO file, danikars.iso and on the iso there is a file
called information.txt

I want to be able to do something like this.

Code:
iso_h = openiso("danikars.iso")
file_h = iso_h.extract("information.txt")
contents = file_h.read()

Is there anything that will give me that functionality? Or close?

Thanks,

Danikar
 
D

David

Is there a way to open a file that is inside of an ISO in python?

Say I have an ISO file, danikars.iso and on the iso there is a file
called information.txt

I want to be able to do something like this.

Code:
iso_h = openiso("danikars.iso")
file_h = iso_h.extract("information.txt")
contents = file_h.read()

Is there anything that will give me that functionality? Or close?

Under Linux you can mount iso files as loopback devices.

eg:

mkdir mnt
sudo mount -o loop file.iso ./mnt

Then the ./mnt directory will 'contain' the contents of the iso
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top