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

kyosohma at gmail.com kyosohma at gmail.com
Wed Aug 29 09:23:00 EDT 2007


On Aug 29, 6: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

Since it's an executable, why not just use the subprocess module?

I did find this set of scripts, but I don't know if they will help:
http://www.example-code.com/python/zip.asp

I did find how to extract via the command line, which you could use in
conjunction with the subprocess module:
http://help.globalscape.com/help/cutezip2/Creating_and_extracting_archives.htm

Mike




More information about the Python-list mailing list