[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

Extracting files from an ISO image?

Ant

1/2/2008 12:06:00 PM

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,

--
Ant.
4 Answers

Jeroen Ruigrok van der Werven

1/2/2008 12:42:00 PM

0

-On [20080102 13:11], Ant (antroy@gmail.com) wrote:
>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/be829b...

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
ã?¤ã?§ã?«ã?¼ã?³ ã?©ã?¦ã??ã?­ã??ã?¯ ã?´ã?¡ã?³ ã??ã?« ã?¦ã?§ã?«ã?´ã?§ã?³
http://www.in-n... | http://www.ra...
When you meet a master in the street, do not speak, do not be silent. Then
how will you greet him?

Grant Edwards

1/2/2008 3:34:00 PM

0

On 2008-01-02, Ant <antroy@gmail.com> wrote:

> 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?

--
Grant Edwards grante Yow! I can't decide which
at WRONG TURN to make first!!
visi.com I wonder if BOB GUCCIONE
has these problems!

Rob Williscroft

1/2/2008 7:07:00 PM

0

Ant wrote in news:34a84caa-5387-40a2-a808-
5e7bd325023e@w47g2000hsa.googlegroups.com 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/cdr...

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.
--
http://www.victim-prime.dsl....

Ant

1/3/2008 9:43:00 AM

0

On Jan 2, 7:07 pm, Rob Williscroft <r...@freenet.co.uk> wrote:
> Ant wrote in news:34a84caa-5387-40a2-a808-
> > 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/cdr...
....
> 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,

--
Ant.