title: I can use the command line to run a .pyw file with pythonw, but the same file will not run when using "open with" -> "pythonw"
body: <p>I have a python script that runs successfully, with no errors or outputs to stderr or stdout, when run with pythonw from the console.
  However, if I try to open that script from file explorer using pythonw, it will exit in a few milliseconds.</p>
  <p>I am using Windows 11, python 3.9.0.</p>
  <p>A command such as &quot;pythonw script.pyw&quot; will work from the console, but the file can't be opened directly.</p>