Extracting files from an ISO image?

A

Ant

Hi all,

My kids have a bunch of games that have to be run from CD (on Windows
XP). Now they're not very careful with them, and so I have a plan.
I've downloaded a utility (Daemon Tools) which allows me to mount and
unmount virtual CD drives onto an ISO image. This works well, but I
want to wrap this in a Python GUI which will present them with a list
of games in a particular directory.

Essentially the steps are this:

1) Look for all .iso files in a directory
2) Pull out the autorun.inf from the iso (if present) and parse it to
get the name of the icon file.
3) Extract the icon file from the iso and pull the image out.
4) Display the icon along with the iso name in a TKinter (of maybe
WxWidgets) app.

The images are important, as our 2 year old doesn't read (obviously),
but can navigate around the desktop by icon.

So I have two questions really:

1) Is there a module out there for extracting files from an ISO?
2) Is there a module out there for extracting icons from a Windows
exe?

Cheers,
 
J

Jeroen Ruigrok van der Werven

-On [20080102 13:11] said:
2) Is there a module out there for extracting icons from a Windows
exe?

This might be a good start:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/be829b454c945a89

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
When you meet a master in the street, do not speak, do not be silent. Then
how will you greet him?
 
G

Grant Edwards

I've downloaded a utility (Daemon Tools) which allows me to mount and
unmount virtual CD drives onto an ISO image.
[...]

1) Is there a module out there for extracting files from an ISO?

Why not just mount them and then use the normal OS file
operations?
 
R

Rob Williscroft

Ant wrote in (e-mail address removed) in comp.lang.python:

[snip]
So I have two questions really:

1) Is there a module out there for extracting files from an ISO?

There are command line programs that can do this:

http://cdrecord.berlios.de/old/private/cdrecord.html

This (with isoinfo.exe from the above) will list all files in an
iso image file:

CD = <path-to-iso>
import subprocess

subprocess.call( [ "isoinfo.exe", '-f', '-i', CD ] )

isoinfo.exe also has a switch to extract a file to stdout

One problem you may have is daemon tools will mount cd images that
aren't iso images, where as isoinfo appears to handle only genuine
iso file systems.

Rob.
 
A

Ant

Ant wrote in news:34a84caa-5387-40a2-a808-

There are command line programs that can do this:

http://cdrecord.berlios.de/old/private/cdrecord.html ....
One problem you may have is daemon tools will mount cd images that
aren't iso images, where as isoinfo appears to handle only genuine
iso file systems.

Cheers for the pointers. I'll try out the isoinfo tool, as my
intention was to extract the images on the fly. If it turns out to be
slow though (or problematic - I assume you mean that images in e.g.
joliet format may not be parsed properly), I'll probably end up
extracting the images and caching them on disk on the addition of new
iso's by simply mounting the image as Grant pointed out.

And it looks like wxPython may have support for icons in an img2py
script, so that may sway me toward wxPython over TkInter.

Cheers,
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top