title: How do I write a bash script in python code
body: <p>in order to get the version of an app from AndroidManifest.xml  I want to execute this bash command :</p>
  
  <blockquote>
    <p>/Users/{PATH-TO-SDK}/28.0.3/aapt dump
    badging com.squareup.cash.apk | sed -n
    "s/.<em>versionName='([^']</em>).*/\1/p"</p>
  </blockquote>
  
  <p>I'm trying to embed it in a python script while using os :</p>
  
  <pre><code>import os
  
  bashcommand = " /Users/{PATH-TO-SDK}/28.0.3/aapt dump badging 
  com.squareup.cash.apk | sed -n "s/.*versionName='\([^']*\).*/\1/p" "
  os.system(bashcommand)
  </code></pre>
  
  <p>But I have this error :</p>
  
  <blockquote>
    <p>SyntaxError: EOL while scanning string literal</p>
  </blockquote>
  
  <p>How can I solve this ?</p>