Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6209487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:59:35+00:00 2026-05-24T05:59:35+00:00

I have a program written in python that uploads an archive (zip file) to

  • 0

I have a program written in python that uploads an archive (zip file) to a remote server. But before uploading it I need to test that it is not corrupted, so I want to execute something like an unzip -t and throw an error if it fails.

Is there something implemented in python that can do that (couldn’t find anything on google), or is there a way to catch the error from my program if I execute the system call unzip -t?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:59:36+00:00Added an answer on May 24, 2026 at 5:59 am

    Zipfile.testzip is your friend.

    Read all the files in the archive and check their CRC’s and file headers. Return the name of the first bad file, or else return None.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have written two modules for my Python Program. I need one module
I have a program written in python that uses dbus to detect inserted usb
I have written a Python program to find the carrier of a cell phone
I have a program written in VB.Net (Visual Studio 2008) that uses a DLL
I have a console program written in C# that I am using to send
I have a client program written in .NET 2.0, that connects to the web
I have written a simple python program l=[1,2,3,0,0,1] for i in range(0,len(l)): if l[i]==0:
I have written a Python script that checks a certain e-mail address and passes
I am an intermediate level Python Programmer and I have written a Python program
I have a python program that does something like this: Read a row from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.