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

Werner Werner.Merkl at fujitsu-siemens.com
Thu Aug 30 02:38:27 EDT 2007


On 29 Aug., 15:23, kyoso... at gmail.com wrote:
> 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_arc...
>
> Mike- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

thank you for answer. I found, that WinZip aund 7-ZIP may handle my
files (I'm not shure, if it's really zip...) So, I thing I try the 7-
zip command line tool (but I'd prefered a Python buildin version)

Werner




More information about the Python-list mailing list