title: extract 7z file using python 3
body: <p>I was trying to decompress a 7z file using python, but I can't seem to figure it out.  I figured I could use the lzma module in python 3, but I can't seem to figure it out:</p>
  
  <p>I thought it would work like the zipfile package:</p>
  
  <pre><code>import lzma
  with lzma.open('data.7z') as f:
      f.extractall(r"&lt;output path&gt;")
  </code></pre>
  
  <p>but after reading the documents, it doesn't seems to.  So here is my question: How can you extract a 7z file using the standard package?  I don't want to call subprocess to extract the files using 7-zip because I can't guarantee that users have this software installed.</p>
  
  <p>I've searched the internets and stack oerflow and noticed all the answers almost go back to using subprocessing which I would like to avoid like the plague.</p>
  
  <p>Though there are similar questions on stackoverflow, the answers all still depend on 7-zip or the 7zip SDK.  I do not want to use the 7-zip sdk/exe for extraction because that assumes the users have the software installed.  </p>
  
  <p>Here is the properties from the 7z file:</p>
  
  <p><a href="https://i.stack.imgur.com/MgzGq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MgzGq.png" alt="enter image description here"></a></p>