title: Python, unpacking a .jar file, doesnt work
body: <p>So, I'm trying to unzip a <code>.jar</code> file using this code:
  It won't unzip, only 20 / 500 files, and no folders/pictures
  The same thing happens when I enter a <code>.zip</code> file in filename.
  Any one any suggestions?</p>
  
  <pre><code>import zipfile
  zfilename = "PhotoVieuwer.jar"
  if zipfile.is_zipfile(zfilename):
      print "%s is a valid zip file" % zfilename
  else:
      print "%s is not a valid zip file" % zfilename
  print '-'*40
  
  zfile = zipfile.ZipFile( zfilename, "r" )
  
  zfile.printdir()
  print '-'*40
  
  for info in zfile.infolist():
      fname = info.filename
  
      data = zfile.read(fname)
  
  
      if fname.endswith(".txt"):
          print "These are the contents of %s:" % fname
          print data
  
  
      filename = fname
      fout = open(filename, "w")
      fout.write(data)
      fout.close()
      print "New file created --&gt; %s" % filename
      print '-'*40
  </code></pre>
  
  <p>But, it doesn't work, it unzips maybe 10 out of  500 files
  Can anyone help me on fixing this?</p>
  
  <p>Already Thanks!</p>
  
  <p>I tried adding, what Python told me, I got this:
  Oops! Your edit couldn't be submitted because:</p>
  
  <p>body is limited to <strong>30000</strong> characters; you entered <strong>153562</strong>
  and only the error is :</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python27\uc\TeStINGGFDSqAEZ.py", line 26, in &lt;module&gt;
      fout = open(filename, "w")
  IOError: [Errno 2] No such file or directory: 'net/minecraft/client/ClientBrandRetriever.class'
  </code></pre>
  
  <p>The files that get unzipped:</p>
  
  <pre><code>amw.Class
  amx.Class
  amz.Class
  ana.Class
  ane.Class
  anf.Class
  ang.Class
  ank.Class
  anm.Class
  ann.Class
  ano.Class
  anq.Class
  anr.Class
  anx.Class
  any.Class
  anz.Class
  aob.Class
  aoc.Class
  aod.Class
  aoe.Class
  </code></pre>