<span class="Comment">360doc 上找到的, 稍微改了一点点, 有效可用, python脚本</span> <span class="Comment">#!/usr/bin/env python</span> <span class="Comment"># -*- coding: utf-8 -*-</span> <span class="PreProc">import</span> os <span class="PreProc">import</span> sys <span class="PreProc">import</span> zipfile <span class="Function">print</span> <span class="String">"Processing File "</span> + sys.argv[<span class="Number">1</span>] f = zipfile.ZipFile(sys.argv[<span class="Number">1</span>], <span class="String">"r"</span>) <span class="Repeat">for</span> name <span class="Operator">in</span> f.namelist(): utf8name = name.decode(<span class="String">'gbk'</span>) <span class="Function">print</span> <span class="String">"Extracting "</span> + utf8name pathname = os.path.dirname(utf8name) <span class="Conditional">if</span> <span class="Operator">not</span> os.path.exists(pathname) <span class="Operator">and</span> pathname != <span class="String">""</span>: os.makedirs(pathname) data = f.read(name) <span class="Conditional">if</span> <span class="Operator">not</span> os.path.exists(utf8name): fo = <span class="Function">open</span>(utf8name, <span class="String">"wb"</span>) fo.write(data) fo.close f.close()