Message311695
| Author |
njs |
| Recipients |
Phaqui, Roy Williams, gregory.p.smith, njs, serhiy.storchaka |
| Date |
2018年02月05日.22:33:14 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1517869994.31.0.467229070634.issue31961@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I think I agree with Serhiy here... the whole difference between run([a]) and run(a) is that in the first case 'a' is treated as a path, and in the second it isn't. This distinction long predates pathlib.
Say I have an oddly named binary with an embedded space in its name:
bin = Path("/bin/ls -l")
# Check that this weird file actually exists:
assert bin.exists()
# runs this weird file
subprocess.run([bin])
# Currently an error; if this is implemented, would run
# /bin/ls, and pass it the -l argument. Refers to something
# completely different than our .exists() call above.
subprocess.run(bin) |
|