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 8093959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:38:20+00:00 2026-06-05T20:38:20+00:00

There is a post on this topic already, but it does not have an

  • 0

There is a post on this topic already, but it does not have an explicit answer to the fundamental question which I am re-asking here:

How do you make 7zip commands from Python?

Attempting to use the subprocess module, I implemented the following which runs but does nothing (from what I can tell):

import subprocess
cmd = ['7z', 'a', '"Test.7z"', '"Test"', '-mx9']
subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)

I know that the following 7zip command works, as I have tested on the Windows command line itself:

7z a "Test.7z" "Test" -mx9

How could I implement that simple 7zip command from Python?

  • 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-06-05T20:38:22+00:00Added an answer on June 5, 2026 at 8:38 pm
    import subprocess
    cmd = ['7z', 'a', 'Test.7z', 'Test', '-mx9']
    sp = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there have been already questions around this topic, but I have not
I know there is this post , but I still want to know more
This question is related with one of my earlier questions.. Previous Post In there
This question is related to a previous post . Is there something comparable to
I already asked a similar question but this one is a bit different/specific: I'm
I browsed through all kinds of post related to this topic but the answers
I have read through Scott Hanselman's post on this topic. I found another article
Before asking I have looked at all relevant posts on this topic I have
I have read other questions on this topic but none that actually answers my
There are a lot of topics on this post. But i couldn't find a

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.