def ZIP_Extract(zipfile, extraction_path, one_folder):
 if (one_folder or cfg.flat_unpack()):
  option = '-j'
 else:
  option = '-qq'
 command = [('%s' % ZIP_COMMAND), '-o', '-qq', option, '-Pnone', ('%s' % zipfile), ('-d%s' % extraction_path)]
 (stup, need_shell, command, creationflags) = build_command(command)
 logging.debug('Starting unzip: %s', command)
 p = subprocess.Popen(command, shell=need_shell, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, startupinfo=stup, creationflags=creationflags)
 output = p.stdout.read()
 logging.debug('unzip output: %s', output)
 ret = p.wait()
 return ret

def ZIP_Extract ( zipfile , extraction_path , one_folder ) : if ( one_folder or cfg . flat_unpack ( ) ) : option = '-j' else : option = '-qq' command = [ ( '%s' % ZIP_COMMAND ) , '-o' , '-qq' , option , '-Pnone' , ( '%s' % zipfile ) , ( '-d%s' % extraction_path ) ] ( stup , need_shell , command , creationflags ) = build_command ( command ) logging . debug ( 'Starting unzip: %s' , command ) p = subprocess . Popen ( command , shell = need_shell , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . STDOUT , startupinfo = stup , creationflags = creationflags ) output = p . stdout . read ( ) logging . debug ( 'unzip output: %s' , output ) ret = p . wait ( ) return ret
unzip single zip set zipfile to extraction_path .