self extracting zipefile (windows) and (standard module) zipefile

Hyuga hyugaricdeau at gmail.com
Wed Aug 29 09:25:07 EDT 2007


First of all, there's really no such thing as a "self extracting
zipefile".  I mean, obviously you have to do something to unzip it.  A
file doesn't just execute itself.  What you're dealing with is not a
_zip file_.  It's an executable that has a zip file bundled with it,
and the code to unzip it, most likely into your current directory
(though some such executables allow you to provide a path to unzip
to).  You'll have to execute it--there's no way you can operate on it
like a normal zip file.

On Aug 29, 7:53 am, Werner <Werner.Me... at fujitsu-siemens.com> wrote:
> Hi,
>
> I try to read (and extract) some "self extracting" zipefiles on a
> Windows system. The standard module zipefile seems not to be able to
> handle this.
>
> >>> fName = r"C:\tmp\mySelfExtratingFile.exe"
> >>> import zipfile
> >>> zipefile.is_zipfile(fName))
>
> False
>
> Is there a wrapper or has some one experience with other libaries to
> extract those files?
>
> Thanks in advance
> Werner




More information about the Python-list mailing list