title: Python subprocess batch file quote escaping
body: <p>So it turns out that <code>subprocess.run</code> doesn't work so great for batch files when you have double-quotes in your arguments. A batch file with the single statement <code>echo %*</code> prints out <code>\"quoted\"</code> when called from <code>subprocess.run(['my.bat', '"quoted"'])</code>, rather than the expected <code>"quoted"</code>. This is apparently <a href="https://bugs.python.org/issue23862" rel="nofollow noreferrer">intended behavior</a>.</p>
  
  <p>What seems to be missing is a workaround. How can I avoid having my double-quotes escaped when calling a batch file? Do I have to monkey-patch <code>subprocess.list2cmdline</code> or is there a better way?</p>