raghur / vim-ghost

Vim/Nvim client for GhostText - Edit browser text areas in Vim/Neovim
333 stars 13 forks source link

Add backported subprocess.run to make sure it works in Python3.4 #4

Closed balta2ar closed 6 years ago

raghur commented 6 years ago

Thanks for the PR.. Couple of questions (I've not used subprocess module outside of ghost :))

  1. In run, why not check existence of run and just call run, else call the backported code?
  2. https://docs.python.org/3/library/subprocess.html#call-function-trio provides simpler alternatives to run. Given that we never need to pass stdin or read the output, does it make sense to use the simpler versions?
balta2ar commented 6 years ago

That totally makes sense! My knee-jerk reaction was to provide a backport of run, but it's actually way simpler to just use call, please take a look.

raghur commented 6 years ago

👍 Thanks - that looks good. So we can just go to subprocess.call.. Can you squash the commit? I'll merge it after that.

balta2ar commented 6 years ago

Done.